How to suppress Excel default message

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hello -

I have a button that deletes a sheet. Prior to the sheet being deleted,
Excel has a message box that pops up asking if you really want to delete it.
I need to suppress that message. Is there a way you can keep default
messages from displaying?

Any help will be greatly appreciated!
 
Sandy,

Try code like

Application.DisplayAlerts = False
' delete the sheet
Application.DisplayAlerts = True


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com
 
Thanks, Chip!
--
Sandy


Chip Pearson said:
Sandy,

Try code like

Application.DisplayAlerts = False
' delete the sheet
Application.DisplayAlerts = True


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com
 
Back
Top