Sub DeleteSheetsPlease()
Dim ws As Worksheet
For Each ws In ThisWorkbook.Worksheets
Application.StatusBar = "checking " & ws.Name
If ws.Name <> "Parameters" And ws.Name <> "About" Then
Application.DisplayAlerts = False
Application.StatusBar = "deleting " & ws.Name
ws.Delete
Application.DisplayAlerts = True
End If
Next ws
End Sub
This skips "Parameters" and "About", then it deletes a single sheet (that does not match "Parameters" or "About"),
BUT THEN IT STOPS, leaving "deleting [WSNAME]" in the appstatus:confused:. It's like it skips the "Next ws" statement altogether after deleting a sheet.
I want it to keep looping on all the sheets, but that delete action seems to kill the looping...
What am I missing? Been grinding on this...
Thanks.
Dim ws As Worksheet
For Each ws In ThisWorkbook.Worksheets
Application.StatusBar = "checking " & ws.Name
If ws.Name <> "Parameters" And ws.Name <> "About" Then
Application.DisplayAlerts = False
Application.StatusBar = "deleting " & ws.Name
ws.Delete
Application.DisplayAlerts = True
End If
Next ws
End Sub
This skips "Parameters" and "About", then it deletes a single sheet (that does not match "Parameters" or "About"),
BUT THEN IT STOPS, leaving "deleting [WSNAME]" in the appstatus:confused:. It's like it skips the "Next ws" statement altogether after deleting a sheet.
I want it to keep looping on all the sheets, but that delete action seems to kill the looping...
What am I missing? Been grinding on this...
Thanks.