|
-
Oct 28th, 2000, 03:39 AM
#1
Thread Starter
New Member
I want to use a variable over different frames. Can anyone tell me how to create the variable and how to fill it in another frame?
-
Oct 28th, 2000, 04:12 AM
#2
Lively Member
just a guess
I'm assuming you mean forms. Add a module and declare it there
-
Oct 28th, 2000, 04:14 AM
#3
Hyperactive Member
Public
There are several ways to do this:
-Dim: Use Dim in a procedure the dim the variable only for that procedure. Use Dim in the Declarations of a form to dim it for the whole form.
-Public: Use Public in the declarations of your form or module to dim it for your whole project.
Example:
Code:
Option Explicit
Dim MyVar As String 'Only for this form or module
Public MyVar As String 'For the whole project :)
I hope this helped you
WP
-
Oct 28th, 2000, 06:51 AM
#4
Fanatic Member
You can even declare your functions and subs as Public in a Form. So you can call them also in any form or module...
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
|