Try the ParamArray Keyword, eg.
Code:
Private Sub Command1_Click()
MsgBox "You Passed " & MultiParams(1, "String", 3.5, 128000) & " Parameters."
End Sub
Private Function MultiParams(ParamArray aParams() As Variant) As Long
Dim I As Integer
MultiParams = UBound(aParams) + 1
For I = 0 To MultiParams - 1
MsgBox "Parameter " & (I + 1) & " = " & aParams(I) & " of Type (" & TypeName(aParams(I)) & ")"
Next
End Function
------------------
Aaron Young
Analyst Programmer
[email protected]
[email protected]