Color an Excel worksheet tab
How to color a single Excel worksheet tab using Excel and VBA methods
1. Right-click on a worksheet that you want to color. 2. Select Tab Color and select the tab color from Theme Colors, Standard Colors or More Colors. Note: in this example we are coloring a worksheet named Sheet1. |
METHOD 2. Color an Excel worksheet tab using the ribbon option
EXCEL
1. Select the worksheet that you want to color. Note: in this example we are coloring a worksheet named Sheet1. |
2. Select the Home tab. |
3. Click Format in the Cells group. 4. Click Tab Color and select the tab color from Theme Colors, Standard Colors or More Colors. |
Dim ws As Worksheet
ws.Tab.ColorIndex = 4
End Sub
Worksheets: The Worksheets object represents all of the worksheets in a workbook, excluding chart sheets.
Worksheet Name: Have a worksheet named Sheet1.
ADJUSTABLE PARAMETERS
Worksheet to Color: Select the worksheet tab that you want to color by changing the Sheet1 worksheet name in the VBA code to any worksheet in the workbook.
Worksheet Tab Color: Select the worksheet tab color by changing the ColorIndex number.
METHOD 2. Color an Excel worksheet tab using VBA with RGB code
VBA
Dim ws As Worksheet
ws.Tab.Color = RGB(0, 255, 0)
End Sub
Worksheets: The Worksheets object represents all of the worksheets in a workbook, excluding chart sheets.
Worksheet Name: Have a worksheet named Sheet1.
ADJUSTABLE PARAMETERS
Worksheet to Color: Select the worksheet tab that you want to color by changing the Sheet1 worksheet name in the VBA code to any worksheet in the workbook.
Worksheet Tab Color: Select the worksheet tab color by changing the RGB code.
METHOD 3. Color an Excel worksheet tab using VBA with vb color code
VBA
Dim ws As Worksheet
ws.Tab.Color = vbGreen
End Sub
Worksheets: The Worksheets object represents all of the worksheets in a workbook, excluding chart sheets.
Worksheet Name: Have a worksheet named Sheet1.
ADJUSTABLE PARAMETERS
Worksheet to Color: Select the worksheet tab that you want to color by changing the Sheet1 worksheet name in the VBA code to any worksheet in the workbook.
Worksheet Tab Color: Select the worksheet tab color by changing the vb color code.
This tutorial explains and provides step by step instructions on how to color a single worksheet tab using Excel and VBA methods.
Excel Methods: Using Excel you can color a worksheet tab with a ribbon or sheet option.
VBA Methods: Using VBA you can color a worksheet tab by referencing to a specific worksheet and using either a color index number, RGB code or vb color code.