Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Varible scope
Is it possible to declare a varible that can be seen (availble) from any
Sub(routine) within the current Module1? If so How |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Varible scope
Declare the variable outside of and before any procedure declaration. Use
"Public" instead of "Dim" if you want to variable to be visible from any module (not just the module in which it is declared) or use "Private" instead of "Dim" if you want the variable to be visible only from within the module in which it is declared. -- Cordially, Chip Pearson Microsoft Most Valuable Professional Excel Product Group Pearson Software Consulting, LLC www.cpearson.com (email on web site) "miek" wrote in message ... Is it possible to declare a varible that can be seen (availble) from any Sub(routine) within the current Module1? If so How |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Varible scope
At the top of the module:
Dim myVar as Variant 'or whatever. Use: Public myVar as Variant If you want it seen in all modules. miek wrote: Is it possible to declare a varible that can be seen (availble) from any Sub(routine) within the current Module1? If so How -- Dave Peterson |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
same varible in formula | Excel Worksheet Functions | |||
varible calculation | New Users to Excel | |||
Unserform with a varible | Excel Programming | |||
Varible in a Range | Excel Programming | |||
how to start from varible row | Excel Programming |