excel vba delete worksheet if exists code example
Example: excel vba delete worksheet if exists
For Each ws In Worksheets
If ws.Name = "asdf" Then
Application.DisplayAlerts = False
Sheets("asdf").Delete
Application.DisplayAlerts = True
End If
Next
Sheets.Add(After:=Sheets(Sheets.count)).Name = "asdf"