Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CPP

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"
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #excel #vba #delete #worksheet #exists
ADD COMMENT
Topic
Name
3+1 =