Solved

Declaring Global Variables

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

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
VB 6.0 printer how to align 6 67
Determine Range to Select 5 53
VBA - If Bookmark = "XXBOOKMARKXX" then 15 40
checkbox to hide entire section 10 42
Introduction While answering a recent question (http://www.experts-exchange.com/Q_27402310.html) in the VB classic zone, I wrote some VB code in the (Office) VBA environment, rather than fire up my older PC.  I didn't post completely correct code o…
Introduction While answering a recent question about filtering a custom class collection, I realized that this could be accomplished with very little code by using the ScriptControl (SC) library.  This article will introduce you to the SC library a…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
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…

828 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