Color an active Excel worksheet tab

How to color an active Excel worksheet tab using VBA

METHOD 1. Color an active Excel worksheet tab using VBA with a color index number

VBA

Sub Color_an_Active_Worksheet_Tab()
'color an active worksheet tab in green
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.

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)

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.

METHOD 3. Color an active Excel worksheet tab using VBA with vb color code

VBA

Sub Color_an_Active_Worksheet_Tab()
'color an active worksheet tab in green
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.

Explanation about how to color an active worksheet tab

EXPLANATION

EXPLANATION
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.