Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How is the best way to set up and pass a parm array to a function 1

Status
Not open for further replies.

SBendBuckeye

Programmer
May 22, 2002
2,166
US
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?

Thanks!
 
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) Forms/Controls Resizing/Tabbing Control
Compare Code (Text)
Generate Sort Class in VB or VBScript
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top