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!

Multiple parameters in a Function Call

Status
Not open for further replies.

braddunlap

Programmer
Jan 19, 2006
5
US
I can not get the multiple parms to work when calling a function. The help guide says to seperate them with a comma, but that still gives me a syntax error on the calling statement.
The Called statement is in a header file, but I don't think that is the problem since the syntax error is in the actual macro.
Here is what the macro code looks like:
SetPassword("key1",PWord$)
Here is what the function definition looks like in the header file:
Function SetPassword(xKey$,xPw$) as String

Any help would be appreciated.

Thanks.
 



hi,

Either a Function or a Sub, that has arguments, if it is used as a statement and is not returning a value, then no parentheses...
Code:
  SetPassword "key1",PWord$


Skip,
[sub]
[glasses]Have you heard that the roundest knight at King Arthur's round table was...
Sir Cumference![tongue][/sub]
 
Thanks Skip.
Actually I found the solution thru tireless trial and error.
I have to call the function with each parameter in Parens.
SetPassword("key1),(PWord$)

Darndest way of calling a function with multiparms, but it works perfectly.
 



The parentheses do absolutely nothing except maybe for visual effect.

Skip,
[sub]
[glasses]Have you heard that the roundest knight at King Arthur's round table was...
Sir Cumference![tongue][/sub]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top