HasMajorGridlines Property

Applies To

Axis Object.

Description

True if the axis has major gridlines. Only axes in the primary axis group can have gridlines. Read-write.

See Also

AxisGroup Property, HasMinorGridlines Property, MajorGridlines 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 = 3    'set color to red
    End If
End With