Excel seems to crash when I try to delete worksheets. The procedure seems to be working in previous release of my tool.
Public Sub delete_worksheet()
Dim shtDelWorkSheet, mySheets
mySheets = Array("A", "B", "C" "D", "E")
For Each shtDelWorkSheet In mySheets
Sheets(shtDelWorkSheet).Visible = False
Application.DisplayAlerts = False
Sheets(shtDelWorkSheet).Delete
Application.DisplayAlerts = True
Next
End Sub
Please what can I do to prevent excel from crashing and giving me the send error report. I've downloaded and installed the latest service pack. Thanks.
Public Sub delete_worksheet()
Dim shtDelWorkSheet, mySheets
mySheets = Array("A", "B", "C" "D", "E")
For Each shtDelWorkSheet In mySheets
Sheets(shtDelWorkSheet).Visible = False
Application.DisplayAlerts = False
Sheets(shtDelWorkSheet).Delete
Application.DisplayAlerts = True
Next
End Sub
Please what can I do to prevent excel from crashing and giving me the send error report. I've downloaded and installed the latest service pack. Thanks.