I want to create the code to be getting all sheets in my workbook except for 2 specific ones. It would be something like I have 17 sheets that I want to parse and 2 extra sheets that I want exclude them by name that I don't need to parse. I tried this code but it deletes the unwanted sheets while what I need is to remove them from the list that I will then use to loop to parse the remaining correct sheets:
Sub Print_all_sheet_names()
' Declare ws as a worksheet object variable.
Dim ws As Worksheet
ThisWorkbook.Sheets("Qlik Ingestion").Delete
ThisWorkbook.Sheets("Dropdown Values").Delete
' Loop through all of the worksheets in the active workbook.
For Each ws In ThisWorkbook.Worksheets
MsgBox ws.Name
Next
End Sub
Anybody knows how I can be left in the list only with the wanted sheets without deleting the unwanted ones?