DeleteOtherSheets

Deletes all sheets in a workbook keeping only one

CodeFunctionName
What is this?

Public

Tested

Original 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 1,177

Downloads 449

CodeID
DB ID