Guzzlr
Well-known Member
- Joined
- Apr 20, 2009
- Messages
- 982
- Office Version
- 2021
- Platform
- Windows
Code:
For Each sht In ActiveWorkbook.Worksheets
If sht.Visible And (sht.Name = "NonFormat") Then
sht.Delete
End If
Next sht
Sheets.Add After:=Sheets(Sheets.Count)
Sheets(Sheets.Count).Name = "NonFormat"
Hello All,
The following will delete the NonFormat sheet, and then add a new sheet...whichis what I want. What if there is no NonFormat sheet to delete, it will fault on me.
How do I get excel to automatically add the NonFormat sheet, if one does not exist to delete?
Thanks for the help