Delete Sheets to the left
Give this a try (I'd put it in a Module)...
Sub DeleteWorksheets()
Dim WS As Worksheet
Worksheets(1).Select
On Error GoTo Whoops
Application.DisplayAlerts = False
For Each WS In Worksheets
If WS.Index 2 Then WS.Delete
Next
Whoops:
Application.DisplayAlerts = True
End Sub
--
Rick (MVP - Excel)
"ian bartlett" wrote in message
news:HAWwk.153184$nD.64076@pd7urf1no...
Don
Chip is right it seems when I run your code I get the error
Run time error 9
Subscript out of range.
Any other ideas ??
|