Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Refence a global in a another VBA Project
hi,
I have an application which has multiple workbooks open at a time. Is it possible to get access to the global variable in the VBA Project for workbook A from code in workbook B. Thank you, Chris |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Refence a global in a another VBA Project
The best way is to create a refernce to the other workbook. By default your
workbook code is VBAProject (The code name in the VBE). If you right click on the project and select properties you can change the name to something more meaningful. Do this for both of the workbooks A and B. Now in workbook B select Tools - References - and create a reference to workbook A (project name). You can now directly reference the global variable in workbook A from Workbook B. -- HTH... Jim Thomlinson "Chris Wilkinson" wrote: hi, I have an application which has multiple workbooks open at a time. Is it possible to get access to the global variable in the VBA Project for workbook A from code in workbook B. Thank you, Chris |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Refence other worksheet-#VALUE! error | Excel Discussion (Misc queries) | |||
Extract Worksheet Title/Refence | Excel Worksheet Functions | |||
refence worksheet name into a formula | Excel Discussion (Misc queries) | |||
Global VBA Project? | Excel Programming | |||
end of column refence in several calculations | Excel Discussion (Misc queries) |