Delete Sheets - OK prompt

  • Thread starter Thread starter Jesse Braswell
  • Start date Start date
J

Jesse Braswell

I have a macro that deletes sheets which works but the warning message
pops up and you have to click OK.
How can I code the OK in or should I use a different command.
Currently:
ActiveWindow.SelectedSheets.Delete

Is there a better?

***** Posted via: http://www.ozgrid.com
Excel Templates, Training & Add-ins.
Free Excel Forum http://www.ozgrid.com/forum *****
 
Hi Jesse try

application.DisplayAlerts = False
ActiveWindow.SelectedSheets.Delete
application.DisplayAlerts = True
 
Back
Top