View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Rick Rothstein Rick Rothstein is offline
external usenet poster
 
Posts: 5,934
Default VBA to sidestep popups...

Try it this way...

Application.DisplayAlerts = False
ActiveWindow.SelectedSheets.Delete
Application.DisplayAlerts = True

--
Rick (MVP - Excel)



"Colin Hayes" wrote in message
...

Hi All

As part of a macro , I use this command :

ActiveWindow.SelectedSheets.Delete

On each occasion I run it , I get a popup which ask me if I really want to
delete the relevant sheet. This brings the whole macro to a halt.

Is there a command I can use to avoid the popup , and have the macro
perform the deletion without stopping the whole routine?

Grateful for any help.



Best Wishes