PDA

View Full Version : dissable my own msgbox



wilg
03-05-2011, 04:07 PM
I have some code that when the sheet calculates a msgbox will pop up.

I have another piece of code I want to run but would like to temp dissable my own code for the msgbox that pops up.

I tried application.displayalerts= false but didn't seem to work.

Am I missing something?

Bob Phillips
03-05-2011, 04:41 PM
AS your code invokes the MsgBox, you will have to code the logic that determines not to invoke it.

mbarron
03-05-2011, 04:49 PM
This can be accomplished turning Application Events off then back on.

Application.EnableEvents = False
'the code that would trigger the calculation event to fire
'goes between the Application.EnableEvents lines
Application.EnableEvents = True