billandrew
Well-known Member
- Joined
- Mar 9, 2014
- Messages
- 743
Good evening
Looking to clear all if any one of the following worksheets exists otherwise continue to add the sheets if they do not exist.
Not sure how to proceed
With ThisWorkbook
On Error Resume Next
.Sheets.Add(after:=.Sheets(.Sheets.Count)).Name = "RegionA"
.Sheets.Add(after:=.Sheets(.Sheets.Count)).Name = "RegionB"
.Sheets.Add(after:=.Sheets(.Sheets.Count)).Name = "RegionC"
.Sheets.Add(after:=.Sheets(.Sheets.Count)).Name = "RegionD"
On Error GoTo 0
End With
Looking to clear all if any one of the following worksheets exists otherwise continue to add the sheets if they do not exist.
Not sure how to proceed
With ThisWorkbook
On Error Resume Next
.Sheets.Add(after:=.Sheets(.Sheets.Count)).Name = "RegionA"
.Sheets.Add(after:=.Sheets(.Sheets.Count)).Name = "RegionB"
.Sheets.Add(after:=.Sheets(.Sheets.Count)).Name = "RegionC"
.Sheets.Add(after:=.Sheets(.Sheets.Count)).Name = "RegionD"
On Error GoTo 0
End With