Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Deleting sheets removing/turning off the xl prompt
Hello
I'm building a macro which involves creating some new worksheets, performing calcs in them, then deleting the rough working worksheets before saving the amended file, using the following code: Sheets("working").Select ActiveWindow.SelectedSheets.Delete unfortunately this means that I have to keep an eye on the computer while running the macro, as the prompt for deleting the sheets comes up everytime. Very annoying when the macro takes about 10 minutes to work on each file. One alternative solution would be to move the rough working sheets to another file and then kill that file, but this seems a bit contrived. Is there a cleverer way of getting around this problem, such as a command to turn off the automatic prompt, or a different way of deleting the sheet which won't require any manual input? Cheers |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Deleting sheets removing/turning off the xl prompt
Hi
try the following application.DisplayAlerts = False Sheets("working").Select ActiveWindow.SelectedSheets.Delete application.DisplayAlerts=True -- Regards Frank Kabel Frankfurt, Germany EMMA wrote: Hello I'm building a macro which involves creating some new worksheets, performing calcs in them, then deleting the rough working worksheets before saving the amended file, using the following code: Sheets("working").Select ActiveWindow.SelectedSheets.Delete unfortunately this means that I have to keep an eye on the computer while running the macro, as the prompt for deleting the sheets comes up everytime. Very annoying when the macro takes about 10 minutes to work on each file. One alternative solution would be to move the rough working sheets to another file and then kill that file, but this seems a bit contrived. Is there a cleverer way of getting around this problem, such as a command to turn off the automatic prompt, or a different way of deleting the sheet which won't require any manual input? Cheers |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Deleting sheets removing/turning off the xl prompt
Hi
As follows : application.DisplayAlerts=False Sheets("working").delete 'don't need to select the sheet before application.DisplayAlerts=True Regards, Jean-Yves "EMMA" . com wrote in message ... Hello I'm building a macro which involves creating some new worksheets, performing calcs in them, then deleting the rough working worksheets before saving the amended file, using the following code: Sheets("working").Select ActiveWindow.SelectedSheets.Delete unfortunately this means that I have to keep an eye on the computer while running the macro, as the prompt for deleting the sheets comes up everytime. Very annoying when the macro takes about 10 minutes to work on each file. One alternative solution would be to move the rough working sheets to another file and then kill that file, but this seems a bit contrived. Is there a cleverer way of getting around this problem, such as a command to turn off the automatic prompt, or a different way of deleting the sheet which won't require any manual input? Cheers |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Turning off prompt to save file with no changes | Excel Discussion (Misc queries) | |||
Deleting or 'turning off' a list | Excel Discussion (Misc queries) | |||
Prompt before deleting worksheets? | Excel Discussion (Misc queries) | |||
Hyperlinks - Turning off (Removing) | Setting up and Configuration of Excel | |||
Deleting a Prompt Message | Excel Programming |