Delete All Worksheets Apart From Some With Particular Name
Sub DeleteSheets()
Dim sht As Worksheet
Application.ScreenUpdating = False
For Each sht In Worksheets
If sht.Name < "HOME" Then
If sht.Name < "ONE" Then
If sht.Name < "TWO" Then
Application.DisplayAlerts = False
sht.Delete
Application.DisplayAlerts = True
End If
End If
End If
Next sht
Application.ScreenUpdating = True
End Sub
---
HTH,
JP
On Oct 30, 7:45 pm, Dave wrote:
How would I delete all Worksheets in a Workbook except those called "HOME",
"ONE" and "TWO" (for example).
Thanks!
Dave
|