View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Jim Thomlinson Jim Thomlinson is offline
external usenet poster
 
Posts: 5,939
Default 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