HasMajorGridlines 属性

如果坐标轴有主要网格线,则该值为 True。仅主坐标轴组中的坐标轴才能有网格线。Boolean 类型,可读写。

示例

本示例设置数值轴主要网格线的颜色。

With myChart.Axes(xlValue)

    If .HasMajorGridlines Then

        .MajorGridlines.Border.ColorIndex = 3    'set color to red

    End If

End With