Color an active Excel worksheet tab
How to color an active Excel worksheet tab using VBA
Sub Color_an_Active_Worksheet_Tab()
'color an active worksheet tab in green
ActiveSheet.Tab.ColorIndex = 4
ActiveSheet.Tab.ColorIndex = 4
End Sub
ADJUSTABLE PARAMETERS
Worksheet Selection: Select any worksheet in the workbook that you want to color.
Worksheet Tab Color: Select the worksheet tab color by changing the ColorIndex number.
Worksheet Selection: Select any worksheet in the workbook that you want to color.
Worksheet Tab Color: Select the worksheet tab color by changing the ColorIndex number.
METHOD 2. Color an active Excel worksheet tab using VBA with RGB code
VBA
Sub Color_an_Active_Worksheet_Tab()
'color an active worksheet tab in green
ActiveSheet.Tab.Color = RGB(0, 255, 0)
ActiveSheet.Tab.Color = RGB(0, 255, 0)
End Sub
ADJUSTABLE PARAMETERS
Worksheet Selection: Select any worksheet in the workbook that you want to color.
Worksheet Tab Color: Select the worksheet tab color by changing the RGB code.
Worksheet Selection: Select any worksheet in the workbook that you want to color.
Worksheet Tab Color: Select the worksheet tab color by changing the RGB code.
Sub Color_an_Active_Worksheet_Tab()
'color an active worksheet tab in green
ActiveSheet.Tab.Color = vbGreen
ActiveSheet.Tab.Color = vbGreen
End Sub
ADJUSTABLE PARAMETERS
Worksheet Selection: Select any worksheet in the workbook that you want to color.
Worksheet Tab Color: Select the worksheet tab color by changing the vb color code.
Worksheet Selection: Select any worksheet in the workbook that you want to color.
Worksheet Tab Color: Select the worksheet tab color by changing the vb color code.
EXPLANATION
This tutorial explains and provides step by step instructions on how to color an active worksheet tab using VBA.
This tutorial explains and provides step by step instructions on how to color an active worksheet tab using VBA.
VBA Methods: Using VBA you can color an active worksheet tab by referencing to a color index number, RGB code or vb color index.