Solved

Declaring Global Variables

Posted on 2000-03-16
1
330 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

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

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 have ever used Microsoft Word then you know that it has a good spell checker and it may have occurred to you that the ability to check spelling might be a nice piece of functionality to add to certain applications of yours. Well the code that…
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…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

760 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

Need Help in Real-Time?

Connect with top rated Experts

26 Experts available now in Live!

Get 1:1 Help Now