|
-
Sep 17th, 2002, 05:09 AM
#1
Thread Starter
So Unbanned
Optional in sub/functions(resolved)
Ok, when nothing is there it says Missing. What can I use in an if statement to check if it's not missing?
like:
VB Code:
sub DoSomething(optional var)
if var <> 'missing' then 'dosomething
end sub
Last edited by DiGiTaIErRoR; Sep 17th, 2002 at 05:12 AM.
-
Sep 17th, 2002, 05:10 AM
#2
Fanatic Member
-
Sep 17th, 2002, 05:11 AM
#3
Fanatic Member
-
Sep 17th, 2002, 05:12 AM
#4
Thread Starter
So Unbanned
-
Sep 17th, 2002, 05:18 AM
#5
Be aware that IsMissing can only be used for optional variant parameters.
Use default values for other parameter types.
eg.
sub DoSomething(optional aNumber as integer = -1)
if aNumber <> -1 then 'dosomething
end sub
-
Sep 17th, 2002, 06:13 AM
#6
Fanatic Member
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
|