MrExcel Publishing
Your One Stop for Excel Tips & Solutions

How to disable macro with VBA?

Posted by HeadachewithMacro on October 31, 2001 9:50 PM

I am programming with VBA to coordinate several EXCEL workbooks. Each workbook has it's own sub workbook_open(). In workbook1 I put code: workbook2
but I don't want the workbook_open() of workbook2 run.
How to achieve this?

Posted by Geoffrey Hurst on November 01, 2001 1:41 AM

Application.EnableEvents = False
Workbooks.Open Filename:="YourWorkbookPFullPath"
Application.EnableEvents = True