Share via


Axes.Item Method

Excel Developer Reference

Returns a single Axis object from an Axes collection.

Syntax

expression.Item(Type, AxisGroup)

expression   A variable that represents an Axes object.

Parameters

Name Required/Optional Data Type Description
Type Required XlAxisType The axis type.
AxisGroup Optional XlAxisGroup The axis.

Return Value
Axis

Example

This example sets the title text for the category axis on Chart1.

Visual Basic for Applications
  With Charts("chart1").Axes.Item(xlCategory)
    .HasTitle = True
    .AxisTitle.Caption = "1994"
End With

See Also