|
-
Nov 27th, 2002, 01:56 PM
#1
Thread Starter
Fanatic Member
Noob easy question about scope
I am just starting to use modules, anyway, I want my product's name to be in a constant, so I can easily change it later on, can I declare it in a module? If I put like "Public const THE_PRODUCT_NAME = "WordPadX v1.0" then I try to use it in a form, it says (variable not definied).
also what is the difference between global and public?
-
Nov 27th, 2002, 02:04 PM
#2
Frenzied Member
global and public are the same thing, just named differently
I think Global is the 'new' way to name them.
I just tried what you posted and it worked for me.
-
Nov 27th, 2002, 02:05 PM
#3
either:
a) you mispelled it
or
b) you ae using a class module isntead of a .bas module
-
Nov 27th, 2002, 02:15 PM
#4
Thread Starter
Fanatic Member
Ok I had the const's declared under all the functions, I moved them up to right under option explicit, It works now.
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
|