< návrat zpět

MS Excel


Téma: volanie procedury s viac argumentami rss

Zaslal/a 29.4.2012 22:19

ahojte
prvykrat potrebujem dostat do procedury viac ako jeden argument. viete mi poradit preco mi to nejde ? uz som skusal aj toto http://www.cadforum.cz/cadforum/Vyvojove-prostredky-AutoCADu/Pasmo/Casti/VisualBasic/VBAZakladyProg/355vbazpmodulyaprocedury.htm#VBA_PRIKLAD_function
a furt nic


Sub prvy()
xx = 5
yy = 2
druhy (xx, yy)
End Sub

Public Sub druhy(aa, bb)
c = aa + bb
MsgBox (c)
End Sub

a bez prilohy 5
dik

Zaslat odpověď >

#008324
avatar
A tebe to tam nesvietilo červeným?
druhy (xx, yy)
Daj tam
Call druhy (xx, yy)
alebo
druhy xx, yycitovat
#008325
avatar
jasne ze svietilo, len som nevedel preco.
jak to ze ked volam proceduru s jednym argumentom tak to ide bez toho Call ?

dikcitovat
#008327
avatar
Podľa syntaxe by to nemalo ísť. Asi to majú slabo ošetrené v prekladači. 7

Syntax

[Call] name [argumentlist]

The Call statement syntax has these parts:

Part Description
Call Optional; keyword. If specified, you must enclose argumentlist in parentheses. For example:

Call MyProc(0)

name Required. Name of the procedure to call.
argumentlist Optional. Comma-delimited list of variables, arrays, or expressions to pass to the procedure. Components of argumentlist may include the keywords ByVal or ByRef to describe how the arguments are treated by the called procedure. However, ByVal and ByRef can be used with Call only when calling a DLL procedure. On the Macintosh, ByVal and ByRef can be used with Call when making a call to a Macintosh code resource.

Remarks

You are not required to use the Call keyword when calling a procedure. However, if you use the Call keyword to call a procedure that requires arguments, argumentlist must be enclosed in parentheses. If you omit the Call keyword, you also must omit the parentheses around argumentlist. If you use either Call syntax to call any intrinsic or user-defined function, the function's return value is discarded.

To pass a whole array to a procedure, use the array name followed by empty parentheses.citovat

Uživatelské menu

Nejste přihlášen(a)
avatar\n

Menu

On-line nástroje

Formulář Faktura

Formulář Faktura IV

Oblíbený formulář Faktura byl vylepšen a rozšířen.
Více se dočtete zde.

Aktivní diskuse

Vynásobit hodnoty kurzem - Power Query

Alfan • 26.4. 7:56

Relativní cesta - zdroje Power Query

Alfan • 26.4. 7:54

Vynásobit hodnoty kurzem - Power Query

elninoslov • 26.4. 7:54

Vynásobit hodnoty kurzem - Power Query

lubo • 25.4. 19:18

Relativní cesta - zdroje Power Query

elninoslov • 25.4. 15:12

Relativní cesta - zdroje Power Query

Alfan • 25.4. 15:08

Relativní cesta - zdroje Power Query

elninoslov • 25.4. 14:21