glenn_r
asked on
how to pass in a list of string/numbers into a vbs function
I have the following vbs function that accepts a parameter array
Function TEST(Arr())
k=ubound(Arr)
msgbox(k)
End Function
The calling function in this system is dynamically generated as a string and then a msscript control invokes it.
How can I call the function and pass in the array by init its values as a string using the following syntax?
Dim numbers = New Integer() {1, 2, 4, 8}
Dim doubles = {1.5, 2, 9.9, 18}
Example:
TEST({1,2,3,4}) '<--how can i pass these in as literals?
Function TEST(Arr())
k=ubound(Arr)
msgbox(k)
End Function
The calling function in this system is dynamically generated as a string and then a msscript control invokes it.
How can I call the function and pass in the array by init its values as a string using the following syntax?
Dim numbers = New Integer() {1, 2, 4, 8}
Dim doubles = {1.5, 2, 9.9, 18}
Example:
TEST({1,2,3,4}) '<--how can i pass these in as literals?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.