Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Suppress Delete Sheet Warning
I'm setting Application.ScreenUpdating = False before deleting a "hidden"
sheet in my workbook. My problem is that the warning saying "Data may exist ...." that pop ups when the "Delete" command is issued, is forcing me to click "Delete". Is there anyway to auto answer the "Delete" dialog button and prevent the user from getting any visual warning of the delete? CODE: Sub RemoveSheetDateHelper() Application.ScreenUpdating = False Sheets("tmpSheet").Visible = True Sheets("tmpSheet").Select Range("A1").Select ActiveWindow.SelectedSheets.Delete Application.ScreenUpdating = True End Sub |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Suppress Delete Sheet Warning
Sub RemoveSheetDateHelper()
With Application .ScreenUpdating = False .DisplayAlerts = False Sheets("tmpSheet").Delete .DisplayAlerts = True .ScreenUpdating = True End With End Sub Note: you don't have to activate or unhide "tmpsheet" to delete it. Gord Dibben MS Excel MVP On Sat, 21 Jun 2008 11:41:26 -0500, "Scott" wrote: I'm setting Application.ScreenUpdating = False before deleting a "hidden" sheet in my workbook. My problem is that the warning saying "Data may exist ..." that pop ups when the "Delete" command is issued, is forcing me to click "Delete". Is there anyway to auto answer the "Delete" dialog button and prevent the user from getting any visual warning of the delete? CODE: Sub RemoveSheetDateHelper() Application.ScreenUpdating = False Sheets("tmpSheet").Visible = True Sheets("tmpSheet").Select Range("A1").Select ActiveWindow.SelectedSheets.Delete Application.ScreenUpdating = True End Sub |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Delete Sheet without Warning | Excel Programming | |||
Delete Sheet w/o warning prompt... | Excel Programming | |||
How to Delete Excel Sheet without Warning - MFC | Excel Programming | |||
VBA Bypass Delete Sheet Warning | Excel Programming | |||
Delete sheet without warning messages | Excel Programming |