I want to delete all sheets in the workbook except the active sheet and specified sheets using there codename
this works to delete all the sheets but dose not also keep the ActiveSheet
![]()
For Each ws In NewWb.Sheets Select Case ws.CodeName Case "DropDown_Sheet_1_VB", "DropDown_Sheet_2_VB", "Control_Sheet_VB", "Master_Work_Order" Case Else With ws ws.Delete End With End Select Next
Bookmarks