Hi Divaker, This is possible. You just have to set a reference to the other workbook in the VBE (Tools -> References).
If you get a name conflict error, it is because the default name for the VBA Project in a workbook is always "VBAProject" and you can't have multiple references with the same name. Just rename one of the projects, such as the one where your code is going. All public code and variables are now available for direct use from the other workbook as long as both workbooks remain open. You can specify your variable any of these ways now: var VBAProject.var module.var VBAProject.module.var Asa From: excel-macros@googlegroups.com [mailto:excel-macros@googlegroups.com] On Behalf Of Divaker Pandey Sent: Friday, March 02, 2012 2:11 AM To: excel-macros@googlegroups.com Subject: Re: $$Excel-Macros$$ to access in Public Variable of Workbook A module by WorkBook B Procedure Still waiting for reply? On Thu, Mar 1, 2012 at 4:47 PM, Divaker Pandey <divake...@gmail.com> wrote: Hi Expert, Is there any way to access in Public Variable of Workbook A module by WorkBook B Procedure. if I can't do any modification in Workbook A macros. Thanks in addvance -- FORUM RULES (986+ members already BANNED for violation) 1) Use concise, accurate thread titles. Poor thread titles, like Please Help, Urgent, Need Help, Formula Problem, Code Problem, and Need Advice will not get quick attention or may not be answered. 2) Don't post a question in the thread of another member. 3) Don't post questions regarding breaking or bypassing any security measure. 4) Acknowledge the responses you receive, good or bad. 5) Cross-promotion of, or links to, forums competitive to this forum in signatures are prohibited. NOTE : Don't ever post personal or confidential data in a workbook. Forum owners and members are not responsible for any loss. ---------------------------------------------------------------------------- -------------------------- To post to this group, send email to excel-macros@googlegroups.com -- FORUM RULES (986+ members already BANNED for violation) 1) Use concise, accurate thread titles. Poor thread titles, like Please Help, Urgent, Need Help, Formula Problem, Code Problem, and Need Advice will not get quick attention or may not be answered. 2) Don't post a question in the thread of another member. 3) Don't post questions regarding breaking or bypassing any security measure. 4) Acknowledge the responses you receive, good or bad. 5) Cross-promotion of, or links to, forums competitive to this forum in signatures are prohibited. NOTE : Don't ever post personal or confidential data in a workbook. Forum owners and members are not responsible for any loss. ---------------------------------------------------------------------------- -------------------------- To post to this group, send email to excel-macros@googlegroups.com -- FORUM RULES (986+ members already BANNED for violation) 1) Use concise, accurate thread titles. Poor thread titles, like Please Help, Urgent, Need Help, Formula Problem, Code Problem, and Need Advice will not get quick attention or may not be answered. 2) Don't post a question in the thread of another member. 3) Don't post questions regarding breaking or bypassing any security measure. 4) Acknowledge the responses you receive, good or bad. 5) Cross-promotion of, or links to, forums competitive to this forum in signatures are prohibited. NOTE : Don't ever post personal or confidential data in a workbook. Forum owners and members are not responsible for any loss. ------------------------------------------------------------------------------------------------------ To post to this group, send email to excel-macros@googlegroups.com