I have seen bits and pieces of this technique in my reading but don't remember where and now I need to do it. Can someone point me or show a little bit of code?
A ParamArray does not have to be an array. It can just be a varying list of parameters OR it can be a variant array.
Function IsEqualAll (p1, ParamArray aryP2() as Variant) as boolean
Dim I as Integer
For I = 0 To Ubound(aryP2)
if P1 <> aryP2(I) then exit sub
Next
IsEqualAll = True
End Function
Dim a, b, c
a = 2
blnEqual = IsEqualAll(a, b, c)
Dim ary
ary = Array(2, 2)
blnEqual= IsEqualAll(1, ary)
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.