Delete all worksheets in a workbook (except Active sheet)
Sub DeleteSheets() Dim XLnCAD As Worksheet For Each XLnCAD In ThisWorkbook.Worksheets If XLnCAD.Name <> ThisWorkbook.ActiveSheet.Name Then Application.DisplayAlerts = False XLnCAD.Delete Application.DisplayAlerts = True End If Next XLnCAD End Sub