Function with an array argument

mbentley

Registered User.
Local time
Today, 16:03
Joined
Feb 1, 2002
Messages
138
I want to create a function that accepts an array of values, rather than a predetermined number of arguments. Can anyone tell me the syntax for this?

Thanks
 
Code:
Private Function MyFunction(strArrays())
 
Thanks. I actually figured this out and forgot to remove my post. I used the Param Array argument. It worked, but was that necessary?
 
If the array is explicitly declared then you can pass it as I mentioned.

i.e.

Dim myArray(1 To 10) As String


If its simply declared with no LBound or UBound then you pass it with the ParamArray argument.

i.e.

Dim myArray() As String
 

Users who are viewing this thread

Back
Top Bottom