Link to home
Start Free TrialLog in
Avatar of glenn_r
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?
ASKER CERTIFIED SOLUTION
Avatar of Bill Prew
Bill Prew

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial