Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
macro to delete a sheet
I know this is an easy one but I need some help.
I'd like to delete a sheet in my macro but I keep getting a dialog box that asks me if I'm sure I want to delete the sheet. I want to bypass this automatically but don't know how. Any help is appreciated. Example of the 2 lines I'm stuck on. Sheets("scratch").Select ActiveWindow.SelectedSheets.Delete I'm using Excel 97. Thanks Kathy |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
macro to delete a sheet
one way:
Application.DisplayAlerts = False Sheets("scratch").Delete Application.DisplayAlerts = True Note that you don't have to select the sheet first. In article , "MoiraGunn" wrote: I know this is an easy one but I need some help. I'd like to delete a sheet in my macro but I keep getting a dialog box that asks me if I'm sure I want to delete the sheet. I want to bypass this automatically but don't know how. Any help is appreciated. Example of the 2 lines I'm stuck on. Sheets("scratch").Select ActiveWindow.SelectedSheets.Delete I'm using Excel 97. Thanks Kathy |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
macro to delete a sheet
Excellent - this works! Thanks very much -
"J.E. McGimpsey" wrote in message ... one way: Application.DisplayAlerts = False Sheets("scratch").Delete Application.DisplayAlerts = True Note that you don't have to select the sheet first. In article , "MoiraGunn" wrote: I know this is an easy one but I need some help. I'd like to delete a sheet in my macro but I keep getting a dialog box that asks me if I'm sure I want to delete the sheet. I want to bypass this automatically but don't know how. Any help is appreciated. Example of the 2 lines I'm stuck on. Sheets("scratch").Select ActiveWindow.SelectedSheets.Delete I'm using Excel 97. Thanks Kathy |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Delete values in sheet 2 that arre found in sheet 1 | Excel Discussion (Misc queries) | |||
Macro to copy values then delete row for entire sheet | New Users to Excel | |||
How can I delete a macro when the Delete button is not active? | Excel Worksheet Functions | |||
Macro for sheet delete, very easy | Excel Discussion (Misc queries) | |||
How do i delete a macro in Excel 2003 when delete isn't highlight | Excel Discussion (Misc queries) |