Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Confirm a choice before Macro | Excel Discussion (Misc queries) | |||
Logbook - Confirm when item not returned yet | Excel Worksheet Functions | |||
Confirm before deleting a worksheet? | Excel Discussion (Misc queries) | |||
Macro : confirm Delete | Excel Programming | |||
Please confirm the following bug in Excel | Excel Programming |