ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Working around a messagebox (https://www.excelbanter.com/excel-programming/299482-working-around-messagebox.html)

JustinR

Working around a messagebox
 
Hi, I have a script that I run at the end of the day. It updates two sheets and one of the sheets there is a worksheet_activate event that is called. Is there anyway to, in the script that i run at the end of the day to disable/skip over the worksheet_activate event. If that isn't possible. The worksheet_activate event is just a msgbox that comes up that ask a yes or no question. Is there a way that I can pass an answer to the msgbox procedue without the user entering one. I just am tried of saying no to this msgbox (to prevent an event from happening) when this end of the day script is run

Thanks

Bob Umlas

Working around a messagebox
 
You can code
Application.EnableEvents = False
and events won't "fire".

Bob Umlas
Excel MVP

"JustinR" wrote in message
...
Hi, I have a script that I run at the end of the day. It updates two

sheets and one of the sheets there is a worksheet_activate event that is
called. Is there anyway to, in the script that i run at the end of the day
to disable/skip over the worksheet_activate event. If that isn't possible.
The worksheet_activate event is just a msgbox that comes up that ask a yes
or no question. Is there a way that I can pass an answer to the msgbox
procedue without the user entering one. I just am tried of saying no to this
msgbox (to prevent an event from happening) when this end of the day script
is run.

Thanks





All times are GMT +1. The time now is 01:55 AM.

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