Excel) (Axis.HasMinorGridlines 属性

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

语法

表达式。HasMinorGridlines

表达式 表示 轴 对象的变量。

示例

此示例为 Chart1 上值轴设置次要网格线的颜色。

With Charts("Chart1").Axes(xlValue) 
 If .HasMinorGridlines Then 
 .MinorGridlines.Border.ColorIndex = 4 
 'set color to green 
 End If 
End With

支持和反馈

有关于 Office VBA 或本文档的疑问或反馈? 请参阅 Office VBA 支持和反馈,获取有关如何接收支持和提供反馈的指南。