ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   How to stop macros in 2nd workbook? (https://www.excelbanter.com/excel-programming/284204-re-how-stop-macros-2nd-workbook.html)

Joe 90[_2_]

How to stop macros in 2nd workbook?
 
Thanks

It works a treat+ACE- as follows:

Application.EnableEvents +AD0- False
Workbooks.Open Filename:+AD0AIg-C:+AFw-myfile.xls+ACI-
Application.EnableEvents +AD0- True


Joe

+ACI-Jim Rech+ACI- +ADw-jrrech+AEA-hotmail.com+AD4- wrote in message
news:eD68PTSuDHA.2208+AEA-TK2MSFTNGP10.phx.gbl...
Use Application.EnableEvents +AD0- False prior to opening the workbook. Reset
it afterward.

--
Jim Rech
Excel MVP




All times are GMT +1. The time now is 05:29 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com