DeleteOtherSheets

Deletes all sheets in a workbook keeping only one


Public

Tested

My Own Work
Sub DeleteOtherSheets(Sheet2Keep, Optional WB = "This")
If WB = "This" Then WB = ThisWorkbook.Name
If WB = "Active" Then WB = ActiveWorkbook.Name
For Each ws In Workbooks(WB).Worksheets
If ws.Name <> Sheet2Keep Then
SheetDelete_ANmar ws.Name, WB
End If
Next ws
End Sub

Sheet2Keep, Optional WB = "This"

Views 285 Downloads 80

VBA-Excel Components
ANmarAmdeen
719
Attachments
Revisions

v1.0