I am declaring a boolean variable into a type but forgot how to give it a default "TRUE" value.. (when declared)
Can someone help me out, I couldn't find by myself on the forums..
Thanks
Printable View
I am declaring a boolean variable into a type but forgot how to give it a default "TRUE" value.. (when declared)
Can someone help me out, I couldn't find by myself on the forums..
Thanks
In VB6 it's not possible - your only option is to set initial value when application starts (sub main or form_load).Quote:
Originally Posted by Krass
Or change processing to consider FALSE as default, eg. IsNotNull instead of IsNull as member of udt.
Could you be thinking of a default when passing arguments to a function?
Private Blah(Optional bMeow:=False)
?
This is your best bet.Quote:
Originally Posted by RhinoBull
Also, if you are only needing the var within a form or class then it really doesnt need to be public in a module as that would make it public accross all forms,. classes, and modules. Unless that is what you want.