Delete worksheet without confirmation

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

Guest

Dear all,

I am using a macro to delete a worksheet of a workbook:

Sheets("mySheet").Select
ActiveWindow.SelectedSheets.Delete

However, it prompts me a dialog box for confirmation everytime. How to skip
this so that the sheet can be delete right away??
Thanks.

Ivan
 
application.DisplayAlerts = False
Sheets("MySheet").Delete
application.DisplayAlerts = True
 
Back
Top