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

When creating a function, how do you specify an argue. as optional?

Status
Not open for further replies.

Paladyr

Programmer
Apr 22, 2001
508
US
See subject... how is this done?
 
MyFunction(Optional myString as String) AS String
 
Okay, it just didn't like it when i did this:

Function(str1 as string, Optional str2 as string, str3 as string)

It didn't like me putting it in the middle. Thanks!
 
You cannot have a required argument after an optional one. You can have as many optional arguements as you like, but once you have one optional arguement, all the rest must be optional as well.
Good Luck
--------------
As a circle of light increases so does the circumference of darkness around it. - Albert Einstein
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top