title | keywords | f1_keywords | api_name | ms.assetid | ms.date | ms.localizationpriority | ||
---|---|---|---|---|---|---|---|---|
Axis.MajorGridlines property (Excel) |
vbaxl10.chm561084 |
|
|
618f880a-2b5d-2357-3c85-7b4858723b28 |
04/13/2019 |
medium |
Returns a Gridlines object that represents the major gridlines for the specified axis. Only axes in the primary axis group can have gridlines. Read-only.
expression.MajorGridlines
expression A variable that represents an Axis object.
This example sets the color of the major gridlines for the value axis on Chart1.
With Charts("Chart1").Axes(xlValue)
If .HasMajorGridlines Then
.MajorGridlines.Border.ColorIndex = 5 'set color to blue
End If
End With
[!includeSupport and feedback]