Prev: Absoute Cell Ref Changes When Inserting New Row in Referenced Shee
Next: HOW DO I CALCULATE WEEKLY PAYMENTS THAT VARY BY LENGTH OFTHE MONT
From: Colin Hayes on 1 Apr 2010 14:22 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 1 Apr 2010 14:47 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 1 Apr 2010 14:51 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 1 Apr 2010 15:14 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 1 Apr 2010 15:32
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. |