Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
Sharing Variables
I give a variable a value in a macro inside a worksheet. I want it to be
available later in other macros in other worksheets and in "ThisWorkbook". How do I do this? Thanks. |
#2
Posted to microsoft.public.excel.misc
|
|||
|
|||
Sharing Variables
How about just declaring that variable as Public in a General module?
CWillis wrote: I give a variable a value in a macro inside a worksheet. I want it to be available later in other macros in other worksheets and in "ThisWorkbook". How do I do this? Thanks. -- Dave Peterson |
#3
Posted to microsoft.public.excel.misc
|
|||
|
|||
Sharing Variables
If you want the variable to be accessable in the same module, you can define
the variable (use dim statement) outside of all functions/procedures and put it at the top of coding. If you want the variable to be accessable in other modules, use public statement. -- Best regards, --- Yongjun CHEN ================================== - - - - www.XLDataSoft.com - - - - Free Excel/VBA Tool & Training Material ================================== "CWillis" wrote in message ... I give a variable a value in a macro inside a worksheet. I want it to be available later in other macros in other worksheets and in "ThisWorkbook". How do I do this? Thanks. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Bubble Charts with two non-numerical variables | Excel Worksheet Functions | |||
Sharing read-write Excel 2003 files | Excel Discussion (Misc queries) | |||
VBA reseting variables | Excel Discussion (Misc queries) | |||
VBA reseting variables | Excel Discussion (Misc queries) | |||
Passing Variables | Excel Discussion (Misc queries) |