Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Static Variables

Status
Not open for further replies.

JohnAcc

Technical User
Aug 13, 2003
143
0
0
GB
Hi There,

I need to declare a static variable and i am not sure where to declare this. At present i am declaring it in a seperate module within the workbook but i have 7 or 8 modules that need to use this variable.

It currently says "invalid - outside procedure"

Any help would be appreciated.

Cheers

John
 
hey John

You cannot have a public static variable, statics are a special type of Local variable.

unfortunatly i dont know a way around this problem, sorry :-(

Ava
 
Hi,

If you declare a public variable in the general section of a module, it keeps his value, like a static variable, as long as the Excel book, where it was created, is open.


Jean-Paul
Montreal
jp@solutionsvba.com
mtljp2@sympatico.ca
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top