ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   WorkbookOpen() Auto macro (https://www.excelbanter.com/excel-programming/279246-workbookopen-auto-macro.html)

Richard[_19_]

WorkbookOpen() Auto macro
 
Hi All
Is there a way of preventing the Workbook_Open() code from executing
when opening an Excel file with the ‘Open' method in VBA?
Thanks
Richard

Ron de Bruin

WorkbookOpen() Auto macro
 
Use something like this Richard

You disable events before you open the file

Sub test()
Application.EnableEvents = False
Workbooks.Open "ron.xls"
Application.EnableEvents = True
End Sub


--
Regards Ron de Bruin
(Win XP Pro SP-1 XL2002 SP-2)
www.rondebruin.nl



"Richard" wrote in message om...
Hi All
Is there a way of preventing the Workbook_Open() code from executing
when opening an Excel file with the 'Open' method in VBA?
Thanks
Richard





All times are GMT +1. The time now is 12:34 PM.

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