Control Tab Colors

  • I use a VBA macro to build a workbook with several sheets; in this new workbook, is it possible to limit what colors can be used to color each sheet's tab?

    I need to limit the colors to:
    Color = 5296274
    Color = 65535
    Color = 49407
    Color = 12611584
    Color = 255
    ThemeColor = ThemeColorDark1, TintAndShade = -0.499984740745262

    Thanks in advance.

  • Re: Control Tab Colors

    it is possible but you have to define all colore which you dont have to use and save it in an excel sheet and then retrieve data from there


    Sub test()
    Dim sh As Worksheet
    For Each sh In ActiveWorkbook.Worksheets
    If sh.Tab.Color = "Your Color" Then
    ''Do your stuff
    End If
    Next sh
    End Sub

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!