轴对象 (Excel)Axes object (Excel)

指定图表中所有**Axis** 对象的集合。A collection of all the Axis objects in the specified chart.

说明Remarks

使用Chart对象的**** 方法可返回坐标轴集合。Use the Axes method of the Chart object to return the Axes collection.

使用(type, group), 其中_type_是轴类型, 而_组_是轴组, 用于返回单个对象。Use Axes (type, group), where type is the axis type and group is the axis group, to return a single Axis object.

  • _Type_可以是下列**XlAxisType** 常量之一: xlCategoryxlSeriesAxisxlValueType can be one of the following XlAxisType constants: xlCategory, xlSeriesAxis, or xlValue.

  • _Group_可以是下列**XlAxisGroup** 常量之一: xlPrimaryxlSecondaryGroup can be one of the following XlAxisGroup constants: xlPrimary or xlSecondary.

示例Example

下例显示第一张工作表上嵌入的第一个图表中的坐标轴数目。The following example displays the number of axes on embedded chart one on worksheet one.

With Worksheets(1).ChartObjects(1).Chart 
 MsgBox.Axes.Count 
End With

下面的示例在名为Chart1的图表工作表上设置分类轴标题文本。The following example sets the category axis title text on the chart sheet named Chart1.

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

方法Methods

属性Properties

另请参阅See also

支持和反馈Support and feedback

有关于 Office VBA 或本文档的疑问或反馈?Have questions or feedback about Office VBA or this documentation? 请参阅 Office VBA 支持和反馈,获取有关如何接收支持和提供反馈的指南。Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.