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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top