Hi, I need to figure out how to delete any worksheets in a workbook that are not specified by a list in the A column. I found this code that works if you can specify the worksheets you want to delete beforehand, but I can't figure out how to delete any worksheets that are not on a list. Thanks in advance for any help.
Sub KillThem()
Dim ws As Worksheet
Application.DisplayAlerts = False
For Each ws In ActiveWorkbook.Worksheets
Select Case UCase(ws.Name)
Case "EXCLUDE1", "EXCLUDE2", "EXCLUDE3"
'do nothing
Case Else
ws.Delete
End Select
Next
Application.DisplayAlerts = True
End Sub
Bookmarks