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 = "4-0") _
And (sht.Name = "4-1") _
And (sht.Name = "4-2") Then
sht.Delete
End If
Next sht
Hello all
I thought the code above would loop through the workbook and delete the specific sheets listed, but it's not.
Where did I go wrong?
Thanks for the help