Parameters passing the number of applications

xiaoxiao2021-03-06  39

Parameters passing the number of applications

If you want to pass the number of parameters to the process, you must declare the last parameters in the parameter table as a variant array with keyword "paramarray". E.g:

SUB MySub (Paramarray P ()) 'parameter is defined as an array

The following possible calls:

Mysub "abc"

MySUB 1, 3, 9, 988, 776, 234

Mysub 123, "ABC", DATE ()

The following methods can be used to read each parameter:

For i = 0 to Ubound (P)

'P (i) is the i-th parameter

NEXT

转载请注明原文地址:https://www.9cbs.com/read-67103.html

New Post(0)