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

Can I use optional parameters in SUB/FUNCTION?

Status
Not open for further replies.

sunlxy

Programmer
Feb 18, 2001
8
0
0
CN
Just like the keyword 'OPTIONAL' in VB? It doesn't work.
:( Maybe it's wrong,but I have done my best.
 
There should not be any problem in using the Optional keyword. Can you post the offending piece of code here?
 
Can you do me a favor to write down your code that contain optional parameter in sub or function? I use the following, it return error message:
Sub something(Optional ByVal SomeVar)
...
End Sub Always learn, always win.
 
I am sorry buddy, you can use ByVal. The syntax seems ok to me. You should not face a problem.
 
Hey buddy, I did not realise that you are using "Optional" keyword in ASP. You cannot use this in ASP.

I hope this helps.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top