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

How do I pass an array to a function?

Status
Not open for further replies.

pmpayne

Programmer
May 30, 2000
1
US
I have the following function call:<br><br>Set rsWorksheetInformation = RunSPReturnRS(strStoredProcedure, _<br>&nbsp;&nbsp;Array(&quot;@RGN&quot;, adInteger, 3, 2), _<br>&nbsp;&nbsp;Array(&quot;@CAT&quot;, adInteger, 3, 65))<br><br>And the following function:<br><br>Function RunSPReturnRS(ByVal strSP, params())<br><br>&nbsp;&nbsp;...<br>&nbsp;&nbsp;...<br><br>End Function<br><br>I get the following error message on the line where the function call is:<br><br>Wrong number of arguments or invalid property assignment.<br><br>What am I doing wrong?<br><br>Thanks in advance for any help.<br><br>Paula
 
Your function is expecting two parameters, you're passing three.&nbsp;&nbsp;Also, remove the () in the function declaration. <p>nick bulka<br><a href=mailto: > </a><br><a href= > </a><br>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top