Delete Sheets - OK prompt

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 *****
 
F

Frank Kabel

Hi Jesse try

application.DisplayAlerts = False
ActiveWindow.SelectedSheets.Delete
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

Top