Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default Confirm deletion

Worksheets(1).Select
ActiveWindow.SelectedSheets.Delete

When deleting a sheet from my workbook using the above code I am asked
to confirm that I really want to do this. How can I force the macro to
delete without requiring confirmation?
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,327
Default Confirm deletion

Hi

Simplify. Dont select and use their windows. Just delete Worksheets(1).

What you look for is DisplayAlerts, set it to False and it means "I know
what I'm doing so don't interrupt". Like this:

Sub Killit()
Application.DisplayAlerts = False
Worksheets(1).Delete
Application.DisplayAlerts = True
End Sub

--
HTH. Best wishes Harald
Followup to newsgroup only please

"dsan" skrev i melding
om...
Worksheets(1).Select
ActiveWindow.SelectedSheets.Delete

When deleting a sheet from my workbook using the above code I am asked
to confirm that I really want to do this. How can I force the macro to
delete without requiring confirmation?



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
Confirm a choice before Macro JSnow Excel Discussion (Misc queries) 3 October 9th 08 08:00 PM
Logbook - Confirm when item not returned yet Steve Jackson Excel Worksheet Functions 2 December 11th 07 01:02 PM
Confirm before deleting a worksheet? edeil Excel Discussion (Misc queries) 1 January 28th 06 02:44 AM
Macro : confirm Delete Tom Excel Programming 2 April 6th 04 09:50 AM
Please confirm the following bug in Excel DennisE Excel Programming 3 December 22nd 03 05:38 PM


All times are GMT +1. The time now is 02:58 AM.

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

About Us

"It's about Microsoft Excel"