Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Suppressing Built-In Excel Dialog /Notifcation Boxes? 2

Status
Not open for further replies.

Phoenix22

Technical User
Sep 23, 2003
29
CA
Hi,

Is there a way to suppress the Excel dialog/notification boxes that pop up asking the user to confirm or accept something (i.e. a box that pops up asking the user if they really want to delete a sheet or enable macros, etc)?

I'm writing a macro and would like to avoid having the user click "ok" for these dialog boxes.

Any advice or assistance would be appreciated, thanks for your help and time.
 
I believe that this line wioll solve your problem
Application.DisplayAlerts = False
 
You may also be able to turn off the events that are causing the popups in the first place with:

Application.EnableEvents = False

Just remember to set it back to True when you are finished! Also, if your code errors out before it gets to the end, events will stay disabled until you reopen Excel.



VBAjedi [swords]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top