I have a workbook with many worksheets. I am trying to copy all of the worksheet where the Tab.ColorIndex = 4 via code, but am completely stuck.
Does anyone know or able to help me where if the Tab.ColorIndex = 4 across any of the sheets then copy this sheet to a new workbook. There will be many worksheets where the Tab.ColorIndex = 4, so I need to code to be able to find all of them and copy the sheet as well as the tab name? I can copy the sheets successfully if I manually name my code to reflect the sheet names but the code is too long and if the sheetname changes, the code fails.
Many thanks for taking the time to read my post and many thanks for any help/assistance that can be given.
Does anyone know or able to help me where if the Tab.ColorIndex = 4 across any of the sheets then copy this sheet to a new workbook. There will be many worksheets where the Tab.ColorIndex = 4, so I need to code to be able to find all of them and copy the sheet as well as the tab name? I can copy the sheets successfully if I manually name my code to reflect the sheet names but the code is too long and if the sheetname changes, the code fails.
Many thanks for taking the time to read my post and many thanks for any help/assistance that can be given.