Working around a messagebox

J

JustinR

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
 
B

Bob Umlas

You can code
Application.EnableEvents = False
and events won't "fire".

Bob Umlas
Excel MVP

JustinR said:
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.
 
Top