credits to MacroShadow, minor amendment to make it better:
Sub Demo(KeepWsh As String) Dim sht As Worksheet Application.DisplayAlerts = False For Each sht In ActiveWorkbook.Sheets If sht.Name <> KeepWsh Then sht.Delete End If Next sht Application.DisplayAlerts = TrueEnd Sub
Open in new window
then:Open in new window