Object | Description | |
Border | The color of the border. | |
Interior | The color of the interior fill. Set ColorIndex to xlColorIndexNone to specify that you don't want an interior fill. Set ColorIndex to xlColorIndexAutomatic to specify the automatic fill (for drawing objects). |
Color | Index value | |
Aqua | 8, 28, 33, 34, 42 | |
Black | 1, 51, 52 | |
Blue | 5, 32, 41, 49 | |
Fuchsia | 7, 26 | |
Gray | 16, 46, 47, 48, 56 | |
Green | 10, 43 | |
Lime | 4 | |
Maroon | 9, 30, 53 | |
Navy | 11, 25, 55 | |
Olive | 12, 44, 45 | |
Purple | 13, 18, 21, 29, 54 | |
Red | 3 | |
Silver | 15, 17, 20, 22, 24, 35, 36, 37, 38, 39 | |
Teal | 14, 23, 31, 50 | |
White | 2, 19, 40 | |
Yellow | 6, 27 |
With myChart.Axes(xlValue)
If .HasMajorGridlines Then
.MajorGridlines.Border.ColorIndex = 5 ' Set color to blue.
End If
End With
This example sets the color of the chart area interior to red and sets the border color to blue.
With myChart.ChartArea
.Interior.ColorIndex = 3
.Border.ColorIndex = 5
End With