How to turn off safety message when deleting a worksheet

  • Thread starter Thread starter L.Peter
  • Start date Start date
' To disable the warning
application.DisplayAlerts = False

'To Delete the worksheet
ActiveWindow.SelectedSheets.Delete

'To enable the warning systems back
application.DisplayAlerts = True
 
Back
Top