From: Colin Hayes on

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
From: Dave Peterson on
Application.displayalerts = false
'your code here
application.displayalerts = true



Colin Hayes wrote:
>
> 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

--

Dave Peterson
From: Rick Rothstein on
Try it this way...

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

--
Rick (MVP - Excel)



"Colin Hayes" <Colin(a)chayes.demon.co.uk> wrote in message
news:19EWOIAOROtLFw7w(a)chayes.demon.co.uk...
>
> 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

From: Jim Thomlinson on
application.dispayalerts = false
ActiveWindow.SelectedSheets.Delete
application.displayalerts = true
--
HTH...

Jim Thomlinson


"Colin Hayes" wrote:

>
> 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
> .
>
From: Colin Hayes on
In article <eI5Cqxc0KHA.348(a)TK2MSFTNGP02.phx.gbl>, Rick Rothstein
<rick.newsNO.SPAM(a)NO.SPAMverizon.net> writes
>Try it this way...
>
> Application.DisplayAlerts = False
> ActiveWindow.SelectedSheets.Delete
> Application.DisplayAlerts = True
>


Hi All

OK Thanks for the suggestions - that's fixed it. No more popup.

Thanks.