I keep getting a send error report when trying to delete some worksheets using the function or macros below:
Public Sub delete_worksheet()
Dim shtDelWorkSheet As Worksheet
For Each shtDelWorkSheet In Application.Worksheets
Select Case shtDelWorkSheet.Name
Case "SAGE_VAR"
Application.DisplayAlerts = False
Sheets("SAGE_VAR").Select
Sheets("SAGE_VAR").Delete
Application.DisplayAlerts = True
Case "Network_Parameters"
Call remove_objects_NetworkParameters
Case "INTERFACE"
Call remove_objects_interface
Case "InputWindow"
Call remove_objects_InputWindow
Case "SETUP"
Application.DisplayAlerts = False
Sheets("SETUP").Select
Sheets("SETUP").Delete
Application.DisplayAlerts = True
Case "Brew_your_own Templates"
Application.DisplayAlerts = False
Sheets("Brew_your_own Templates").Select
Sheets("Brew_your_own Templates").Delete
Application.DisplayAlerts = True
Case "Brew_NAW"
Application.DisplayAlerts = False
Sheets("Brew_NAW").Select
Sheets("Brew_NAW").Delete
Application.DisplayAlerts = True
Case "Brew_Sprint_IP"
Application.DisplayAlerts = False
Sheets("Brew_Sprint_IP").Select
Sheets("Brew_Sprint_IP").Delete
Application.DisplayAlerts = True
Case Else
'do nothing
End Select
Set shtDelWorkSheet = Nothing
Next
End Sub
Public Sub delete_worksheet()
Dim shtDelWorkSheet As Worksheet
For Each shtDelWorkSheet In Application.Worksheets
Select Case shtDelWorkSheet.Name
Case "SAGE_VAR"
Application.DisplayAlerts = False
Sheets("SAGE_VAR").Select
Sheets("SAGE_VAR").Delete
Application.DisplayAlerts = True
Case "Network_Parameters"
Call remove_objects_NetworkParameters
Case "INTERFACE"
Call remove_objects_interface
Case "InputWindow"
Call remove_objects_InputWindow
Case "SETUP"
Application.DisplayAlerts = False
Sheets("SETUP").Select
Sheets("SETUP").Delete
Application.DisplayAlerts = True
Case "Brew_your_own Templates"
Application.DisplayAlerts = False
Sheets("Brew_your_own Templates").Select
Sheets("Brew_your_own Templates").Delete
Application.DisplayAlerts = True
Case "Brew_NAW"
Application.DisplayAlerts = False
Sheets("Brew_NAW").Select
Sheets("Brew_NAW").Delete
Application.DisplayAlerts = True
Case "Brew_Sprint_IP"
Application.DisplayAlerts = False
Sheets("Brew_Sprint_IP").Select
Sheets("Brew_Sprint_IP").Delete
Application.DisplayAlerts = True
Case Else
'do nothing
End Select
Set shtDelWorkSheet = Nothing
Next
End Sub