How to turn off safety message when deleting a worksheet

  • Thread starter Thread starter L.Peter
  • Start date Start date
L

L.Peter

Dear Group,
How to tell excel not to ask when I delete a worksheet?

TIA

Peter
 
' To disable the warning
application.DisplayAlerts = False

'To Delete the worksheet
ActiveWindow.SelectedSheets.Delete

'To enable the warning systems back
application.DisplayAlerts = True
 

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