Deleting Sheet

  • Thread starter Thread starter Tommi
  • Start date Start date
T

Tommi

Hello!

When I want delete sheet in VBA and I don't want that warning message (are
you sure etc...) appear, how I can do that?

Thanks

BR,
Tommi
 
Application.DisplayAlerts = False 'at the beginning of module
Application.DisplayAlerts = True 'at end of module

Amit
 
Tommi

Sub SheetDelete()
Application.DisplayAlerts = False
ActiveWindow.SelectedSheets.Delete
Application.DisplayAlerts = True
End Sub

Gord Dibben Excel MVP
 
Back
Top