-
October 26th, 2009, 12:04 PM
#1
VB6 Functions: Optional Parameters
How do I test for the presence of an option parameter with a function?
Example
Public Sub GridWrite(Grid As Control, FileName As String, Optional AnyForm As Form)
I want to see if the optional parameter "Anyform" was given by the calling form.
I tried:
if AnyForm.Name>"" then
' statements when parameter is given
endif
but I get an error 91: Object variable or With block variable not set.
Same thing with:
if AnyForm >'' then
If the optional parameter is an Integer, then a zero is given but when the parameter is a form, I get the error.
Thanks for your help
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|