Home |
Search |
Today's Posts |
|
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
deleting sheet: how to omit warning
Hello there,
when I call sheets(xyz).delete to delete a sheet from a workbook I get a warning at runtime asking if I am sure that I want that sheet deleted. (I wouldn't have coded it that way if I didn't want it deleted :-)) My question: How do I omit this warning at runtime of my vba script? thanks Marco |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
deleting sheet: how to omit warning
Application.DisplayAlerts = False
....will turn off such warnings Patrick Molloy Microsoft Excel MVP -----Original Message----- Hello there, when I call sheets(xyz).delete to delete a sheet from a workbook I get a warning at runtime asking if I am sure that I want that sheet deleted. (I wouldn't have coded it that way if I didn't want it deleted :-)) My question: How do I omit this warning at runtime of my vba script? thanks Marco . |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
deleting sheet: how to omit warning
Don't forget to turn it back on again at the end!
-----Original Message----- Application.DisplayAlerts = False ....will turn off such warnings Patrick Molloy Microsoft Excel MVP -----Original Message----- Hello there, when I call sheets(xyz).delete to delete a sheet from a workbook I get a warning at runtime asking if I am sure that I want that sheet deleted. (I wouldn't have coded it that way if I didn't want it deleted :-)) My question: How do I omit this warning at runtime of my vba script? thanks Marco . . |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
deleting sheet: how to omit warning
You might find the following example of some interest, I use it to
delete sheets that look like I have no further use for, but it will not delete sheets that have event macros, which may have something still of interest. Delete Active Sheet if name begins with "sheet" (#DeleteThisSheet) http://www.mvps.org/dmcritchie/excel...eleteThisSheet Information on event macros on my event.htm page. --- HTH, David McRitchie, Microsoft MVP - Excel [site changed Nov. 2001] My Excel Pages: http://www.mvps.org/dmcritchie/excel/excel.htm Search Page: http://www.mvps.org/dmcritchie/excel/search.htm wrote in message ... Don't forget to turn it back on again at the end! -----Original Message----- Application.DisplayAlerts = False ....will turn off such warnings Patrick Molloy Microsoft Excel MVP -----Original Message----- Hello there, when I call sheets(xyz).delete to delete a sheet from a workbook I get a warning at runtime asking if I am sure that I want that sheet deleted. (I wouldn't have coded it that way if I didn't want it deleted :-)) My question: How do I omit this warning at runtime of my vba script? thanks Marco . . |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
deleting sheet: how to omit warning
Use Application.DisplayAlerts = False
This will block all alerts until the macro ends so you may want to set it to True after the delete. -- Jim Rech Excel MVP |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Warning upon closing sheet | Excel Worksheet Functions | |||
How to prevent warning messages on protected work sheet. | Excel Worksheet Functions | |||
What is the VBA code to delete a sheet without warning message? | Excel Discussion (Misc queries) | |||
macro warning persists even after deleting all macros | Excel Discussion (Misc queries) | |||
Deleting a Sheet | Excel Programming |