Axes Method
Returns an object that represents either a single axis or a collection of the axes on the chart.
expression.Axes(Type, AxisGroup)
*expression * Required. An expression that returns one of the objects in the Applies To list.
XlAxisType
XlAxisType can be one of these XlAxisType constants. |
xlValue |
xlCategory
xlSeriesAxis (valid only for 3-D charts) |
XlAxisGroup
XlAxisGroup can be one of these XlAxisGroup constants. |
xlPrimary |
xlSecondary
If this argument is omitted, the primary group is used. 3-D charts have only one axis group. |
Example
This example adds an axis label to the category axis.
With myChart.Axes(xlCategory)
.HasTitle = True
.AxisTitle.Text = "July Sales"
End With
This example turns off major gridlines for the category axis.
myChart.Axes(xlCategory).HasMajorGridlines = False
This example turns off all gridlines for all axes.
For Each a In myChart.Axes
a.HasMajorGridlines = False
a.HasMinorGridlines = False
Next a
Applies to | Chart Object