Axes.Item method (PowerPoint)

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.

Example

Note

Although the following code applies to Microsoft Word, you can readily modify it to apply to PowerPoint.

The following example sets the title text for the category axis for the first chart in the active document.

With ActivePresentation.Slides(1).Shapes(1)

    If .HasChart Then

        With .Chart.Axes.Item(xlCategory)

            .HasTitle = True

            .AxisTitle.Caption = "1994"

        End With

    End If

End With

See also

Axes Object

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.