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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

passing string array into a procedure

Status
Not open for further replies.

GabKPK

Programmer
Jan 29, 2002
6
SG
I have problem passing the array into a procedure, is my syntax correct? I am not very familiar with VBA.

Function func1(ParamArray array1())
.
.
.
func2(array1()) ' It is a string array.
.
end Function

sub func2(paramArray array2())
.
.
end sub
 
ParamArray is a special purpuse constructin for a list of optional parameters. If you are passing a string array
Dim aryStr() As String
Redim aryStr(whatever)
then use
Function func1(array1() as string)
.
.
.
func2(array1()) ' It is a string array.
.
end Function

sub func2(array2() as string)
.
.
end sub
Generate Forms/Controls Resizing/Tabbing Class
Compare Code (Text)
Generate Sort Class in VB or VBScript
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top