Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Open Event
Anyone know how to open a work book through code and suppress the any code
that is in the open event of the book being opened? I know you can do it manually by holding the shift key to go into design mode so there must be a VBA equivalent mustn't there? |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Open Event
Hi Andy
Use EnableEvents Sub test() Application.EnableEvents = False Workbooks.Open "C:\Data\test1.xls" Application.EnableEvents = True End Sub Or put your code in this sub Sub Auto_open() End Sub Must be in a normal module If you use a Auto_open macro then this wil not run if you open the file with a macro -- Regards Ron de Bruin http://www.rondebruin.nl "Andy" wrote in message ... Anyone know how to open a work book through code and suppress the any code that is in the open event of the book being opened? I know you can do it manually by holding the shift key to go into design mode so there must be a VBA equivalent mustn't there? |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Open Event
Thanks Ron
Andy "Ron de Bruin" wrote: Hi Andy Use EnableEvents Sub test() Application.EnableEvents = False Workbooks.Open "C:\Data\test1.xls" Application.EnableEvents = True End Sub Or put your code in this sub Sub Auto_open() End Sub Must be in a normal module If you use a Auto_open macro then this wil not run if you open the file with a macro -- Regards Ron de Bruin http://www.rondebruin.nl "Andy" wrote in message ... Anyone know how to open a work book through code and suppress the any code that is in the open event of the book being opened? I know you can do it manually by holding the shift key to go into design mode so there must be a VBA equivalent mustn't there? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Open Event | Excel Discussion (Misc queries) | |||
Workbook Open Event | Excel Programming | |||
user form-on open event? keydown event? | Excel Programming | |||
Workbook Open Event | Excel Programming | |||
Open event | Excel Programming |