Axes collection (Excel Graph)
A collection of all the Axis objects in the specified chart.
Remarks
Use the Axes method to return the Axes collection.
Use Axes (type, group), where type is the axis type and group is the axis group, to return a single Axis object.
Type can be one of the following XlAxisType constants: xlCategory, xlSeriesAxis, or xlValue.
Group can be either of the following XlAxisGroup constants: xlPrimary or xlSecondary.
Example
The following example displays the number of axes in the chart.
With myChart
MsgBox .Axes.Count
End With
The following example sets the title text for the category axis.
With myChart.Axes(xlCategory)
.HasTitle = True
.AxisTitle.Caption = "1994"
End With
Support and feedback
Have questions or feedback about Office VBA or this documentation? Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for