Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Howdy all.
I have a workbook with around 7 modules. Each module refer's to a few cells in one worksheet, to create a few variables. I want to be able to declare those variables as global, so i dont have to have the same variable declaring coding in each module. Can this be done by simply making another module and putting the declarations in as Public, instead of Dim? (Note: i need to keep macro'sin seperate modules for cleanlyness...) Any assitance is greatly appreciated. |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
If the modules are public and you variables are declared at the top of the
module outside any procedure then a variable like Public lVar as Long should be visible to all other modules in the project. Regards, Tom Ogilvy skmr3 wrote in message ... Howdy all. I have a workbook with around 7 modules. Each module refer's to a few cells in one worksheet, to create a few variables. I want to be able to declare those variables as global, so i dont have to have the same variable declaring coding in each module. Can this be done by simply making another module and putting the declarations in as Public, instead of Dim? (Note: i need to keep macro'sin seperate modules for cleanlyness...) Any assitance is greatly appreciated. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Declaring variables for use in multiple worksheets | Excel Discussion (Misc queries) | |||
Overflow error when declaring variables | Excel Discussion (Misc queries) | |||
Declaring variables in Module vs. Public | Excel Discussion (Misc queries) | |||
Declaring variables | Excel Discussion (Misc queries) | |||
Declaring variables | Excel Discussion (Misc queries) |