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

Passing a multidimensional array to a funtion

Status
Not open for further replies.

newprogrammer999

Programmer
Aug 28, 2002
26
IE
Hi all,
I am just wondering if I can pass a multidimensional array to a function and have it passed back later. I have been trying to do this but can't seem to get it right so I am wondering if i have to break it up in to an array of arrays?
Any help would be greatly appricated.

Regards,
benny
 
When you pass an array to a function, you are not actually passing the array but a pointer to the array. For this reason all array parameters in a Sub or Function must be declared as ByRef, not ByVal (the default). Try setting up your Sub/Function like this:

Sub MySub(ByRef ArrayParameter() as String)

I used to rock and roll every night and party every day. Then it was every other day. Now I'm lucky if I can find 30 minutes a week in which to get funky. - Homer Simpson
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top