![]() |
Disable event macro while Auto_open() run
New at this so discription may be wrong
Is it possible to disable an event macro (Macro in sheet 1) while Auto_Open macro (in module) is running. i.e excel file is opening. one way might be to check which macro triggered the event macro. !!! Sunil |
Disable event macro while Auto_open() run
The easiest way is to surround your code with this:
Sub xxx() Application.EnableEvents = False ' your code in here Application.EnableEvents = True End Sub -- steveB Remove "AYN" from email to respond "Sunil Patel" wrote in message ... New at this so discription may be wrong Is it possible to disable an event macro (Macro in sheet 1) while Auto_Open macro (in module) is running. i.e excel file is opening. one way might be to check which macro triggered the event macro. !!! Sunil |
Disable event macro while Auto_open() run
Sub Auto_Open()
On Error goto ErrHandler Application.EnableEvents = False ' current code ErrorHandler: Application.EnableEvents = True End Sub -- Regards, Tom Ogilvy "Sunil Patel" wrote in message ... New at this so discription may be wrong Is it possible to disable an event macro (Macro in sheet 1) while Auto_Open macro (in module) is running. i.e excel file is opening. one way might be to check which macro triggered the event macro. !!! Sunil |
All times are GMT +1. The time now is 12:24 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com