Axes Collection

         
Chart
Axes (Axis)
AxisTitle
Border
Gridlines
TickLabels

指定的图表中所有 Axis 对象的集合。

Axes 集合对象用法

使用 Axes 方法可返回 Axes 集合。下例显示图表中坐标轴的数目。

With myChart
    MsgBox .Axes.Count
End With

使用 Axes(type, group) 可返回单个 Axis 对象,其中 type 为坐标轴类型,而 group 为坐标轴组。

Type 可为以下 XlAxisType 常量之一。

Group 可为以下 XlAxisGroup 常量之一:xlPrimaryxlSecondary。有关详细信息,请参阅 Axes 方法。

下例设置分类轴的标题文字。

With myChart.Axes(xlCategory)
    .HasTitle = True
    .AxisTitle.Caption = "1994"
End With