Solved

Declaring Global Variables

Posted on 2000-03-16
1
332 Views
Last Modified: 2010-05-02
I have a two sheet project, if I declare a Dim variable in the General Declarations of Form1 it is not recognised on Form 2.
I have tried adding a module declaring a Global Variable and creating the .bas file but this is not seen on either form.

Basically how do I declare a variable that will be seen on which ever form I am in ?
0
Comment
Question by:Mister_Simon
1 Comment
 
LVL 9

Accepted Solution

by:
samopal earned 35 total points
ID: 2624631
In you module add line

Public var as string
Public AnotherVar as Byte
....

HTH
0

Featured Post

Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

778 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question