Applies To
Axis Object.
Description
Accessor. 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.
See Also
AxisGroup Property, HasMajorGridlines Property, HasMinorGridlines Property, MinorGridlines Property.
Example
This example sets the color of the major gridlines for the value axis in Chart1.
With Charts("Chart1").Axes(xlValue) If .HasMajorGridlines Then .MajorGridlines.Border.ColorIndex = 5 '' 273.'set color to blue End If End With