VB6
'=============
Private Sub MySub(ParamArray VarArg())
Dim i As Integer
For i = 0 To UBound(VarArg)
Debug.Print VarArg(i)
Next
End Sub
'=============
VS05
'=============
Private Sub MySub(ParamArray ByVal VarArg() As Object)
Dim i As Short
For i = 0 To UBound(VarArg)
Debug.Print(VarArg(i))
Next
End Sub
'=============
Now wondering if ParamArray's as useless as it was in VB6 <g> Every time I
considered using ParamArray, I changed my mind (in favor of a real array)
for one reason or another. Especially with VB6 (as opposed to VB5 that
didn't support passing/recv'ing arrays as well as 6)
Public Function X( ByVal ParamArray Args as Object())
... or ..
Public Function X( ByVal ParamArray Args as String())
... or ..
Public Function X( ByVal ParamArray Args as SomeOtherType())
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.