This video details the VBA code needed to hide worksheets that have a coloured sheet tab. It also demonstrates how to hide sheets that have a sheet tab with a specific colour assigned. The VBA code is shown below the video.
VBA Code to Hide All Coloured Sheet Tabs
Sub HideColouredTabs() Dim ws As Worksheet For Each ws In ThisWorkbook.Worksheets If ws.Tab.Color <> False Then ws.Visible = xlSheetHidden End If End Sub
VBA Code to Hide Red Sheet Tabs – Change the RGB Values to Specify a Different Colour
Sub HideRedTabs() Dim ws As Worksheet For Each ws In ThisWorkbook.Worksheets If ws.Tab.Color = RGB(255, 0, 0) Then ws.Visible = xlSheetHidden End If End Sub