Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 28
Default 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   Report Post  
Posted to microsoft.public.excel.programming
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

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Refence other worksheet-#VALUE! error plantslayer Excel Discussion (Misc queries) 1 March 10th 09 11:18 AM
Extract Worksheet Title/Refence Ludim Excel Worksheet Functions 1 March 10th 09 05:51 AM
refence worksheet name into a formula excelhurtsme Excel Discussion (Misc queries) 5 October 20th 08 04:46 PM
Global VBA Project? [email protected] Excel Programming 2 October 4th 05 05:09 PM
end of column refence in several calculations James Garlock Excel Discussion (Misc queries) 1 December 14th 04 04:22 PM


All times are GMT +1. The time now is 07:52 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"