|
-
Feb 13th, 2009, 11:09 AM
#2
Re: Variables
Thread moved from the FAQ forum, which is not the place to post your questions - VB6 assumed.
Public is what you want (Private is limited to the code file it is in), the problem you are having is that it is defined in a form - so outside of the form you need to specify the form too, eg:
This is needed because you can create multiple copies of the same form (and thus variables), and need to be able to determine which would be used.
As to calling the sub, what you showed should be fine, however if you leave out the Call keyword (or if it is a function, use the result) you need to remove the brackets.
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
|