This documentation is archived and is not being maintained.

MajorGridlines Property

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.

This example sets the color of the major gridlines for the value axis in the chart.

With myChart.Axes(xlValue) 
 If .HasMajorGridlines Then 
 .MajorGridlines.Border.ColorIndex = 5 
 End If 
End With