Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Setting Public variable
Message
 
To
22/08/2000 00:20:27
General information
Forum:
Visual Basic
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00407614
Message ID:
00407662
Views:
26
>I wonder when a variable is declared as Public, it is visible
>be all forms, functions and procedures?
>
>I have declared a Public variable in the main module, but when
>I called a form, it doesn't recognised the public variable.
>Pls advise, thanks.

By "Main module", do you mean a standard .bas module? If so, your variable is visible everywhere in your application.

If not:
-Check your spelling.
-Add "Option Explicit" to every module (frm, bas, cls, ...) of your app.
-Check for another variable of the same name with local visibility.
Éric Moreau, MCPD, Visual Developer - Visual Basic MVP
Conseiller Principal / Senior Consultant
Moer inc.
http://www.emoreau.com
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform