如果坐标轴有主要网格线,则该值为 True。仅主要坐标轴组中的坐标轴才能有网格线。Boolean 类型,可读写。
本示例为 Chart1 中数值坐标轴的主要网格线设置了颜色。
With Charts("Chart1").Axes(xlValue) If .HasMajorGridlines Then .MajorGridlines.Border.ColorIndex = 3 'set color to red End If End With