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 Boolean.

See Also

AxisGroup property, HasMinorGridlines property, MajorGridlines property, MinorGridlines property.

Example

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

With myChart.Axes(xlValue)
    If .HasMajorGridlines Then
        .MajorGridlines.Border.ColorIndex = 3   ' Set color to red.
    End If
End With