K
kevlarmcc
I am using Select Case in a macro that deletes worksheets to skip
specifically named worksheets. Code is:
For Each Worksheet In Worksheets
Select Case Worksheet.name
Case "Sheet1", 'Sheet2", "Sheet3", etc.
Case Else
Worksheet.Activate
Application.DisplayAlerts = False
ActiveSheet.Delete
Application.DisplayAlerts = True
End Select
Next Worksheet
The problem is I have a worksheet named "BGE" that I want skipped and the
select case is not recognizing it and deletes it. I wonder if this has to do
with Excel 2k7 using BGE as a cell value. Any ideas?
specifically named worksheets. Code is:
For Each Worksheet In Worksheets
Select Case Worksheet.name
Case "Sheet1", 'Sheet2", "Sheet3", etc.
Case Else
Worksheet.Activate
Application.DisplayAlerts = False
ActiveSheet.Delete
Application.DisplayAlerts = True
End Select
Next Worksheet
The problem is I have a worksheet named "BGE" that I want skipped and the
select case is not recognizing it and deletes it. I wonder if this has to do
with Excel 2k7 using BGE as a cell value. Any ideas?