View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Scott Scott is offline
external usenet poster
 
Posts: 149
Default 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