Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 465
Default VBA to sidestep popups...


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
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 35,218
Default VBA to sidestep popups...

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
  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
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


  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 5,939
Default VBA to sidestep popups...

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
.

  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 465
Default VBA to sidestep popups...

In article , Rick Rothstein
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.

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Using Popups to supply variables Colin Hayes Excel Worksheet Functions 6 January 31st 10 07:51 PM
Customising Standard Popups Colin Hayes Excel Discussion (Misc queries) 10 May 28th 07 02:50 AM
Amending standard Excel popups Colin Hayes Excel Worksheet Functions 4 May 12th 07 06:32 PM
Disabling security popups Colin Hayes Excel Worksheet Functions 0 April 9th 07 02:29 PM
Automated Popups Brad.R.Sutton Excel Worksheet Functions 1 April 12th 06 03:57 PM


All times are GMT +1. The time now is 08:24 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"