Hello,
I have an Excel workbook that has a number of sheets, where "Graphs" begin at Sheet16 and can either be a couple sheets, or many (i.e. 20).
Could someone assist on how I can code to select sheet16 through the end of the workbook, and then simply delete the sheets?
So far I've tried the following with no success (it eliminates some sheets, not all). Thanks in advance for your help!!!
----------------------------------------------
Dim iSheetCount As Integer
Dim iSheet As Integer
Dim ws As Integer
Application.Dis playAlerts = False
On Error Resume Next
iSheetCount = ActiveWorkbook. Worksheets.coun t
For iSheet = 16 To iSheetCount
Worksheets(iShe et).Delete
Next iSheet
Application.Dis playAlerts = True
I have an Excel workbook that has a number of sheets, where "Graphs" begin at Sheet16 and can either be a couple sheets, or many (i.e. 20).
Could someone assist on how I can code to select sheet16 through the end of the workbook, and then simply delete the sheets?
So far I've tried the following with no success (it eliminates some sheets, not all). Thanks in advance for your help!!!
----------------------------------------------
Dim iSheetCount As Integer
Dim iSheet As Integer
Dim ws As Integer
Application.Dis playAlerts = False
On Error Resume Next
iSheetCount = ActiveWorkbook. Worksheets.coun t
For iSheet = 16 To iSheetCount
Worksheets(iShe et).Delete
Next iSheet
Application.Dis playAlerts = True
Comment