cgmojoco
Well-known Member
- Joined
- Jan 15, 2005
- Messages
- 696
How would I go about getting the below code to check first if the sheet exists and skip the delete function if it does not exist?
My users are getting an error because sometimes the sheet does not exist.
My users are getting an error because sometimes the sheet does not exist.
Code:
Sub DELETEShts()
Application.DisplayAlerts = False
Sheets("AAA").Select
ActiveWindow.SelectedSheets.Delete
Application.DisplayAlerts = False
Sheets("BBB").Select
ActiveWindow.SelectedSheets.Delete
Application.DisplayAlerts = False
Sheets("CCC").Select
ActiveWindow.SelectedSheets.Delete
Application.DisplayAlerts = True
End Sub