Table of contents
Collapse the table of content
Expand the table of content

Chart.HasAxis Property (PowerPoint)

office 365 dev account|Last Updated: 6/12/2017
1 Contributor

Returns or sets which axes exist on the chart. Read/write Variant.


expression. HasAxis( Index1, Index2 )

expression A variable that represents a Chart object.


NameRequired/OptionalData TypeDescription
Index1OptionalVariantThe axis type. Series axes apply only to 3-D charts. Can be one of the XlAxisType constants.
Index2OptionalVariantThe axis group. 3-D charts have only one set of axes. Can be one of the XlAxisGroup constants.


You must enter a value for at least one of the parameters when you set this property.

Microsoft Word may create or delete axes if you change the chart type or the AxisGroup property.


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

The following example enables the primary value axis for the first chart in the active document.

With ActiveDocument.InlineShapes(1)

    If .HasChart Then

        .Chart.HasAxis(xlValue, xlPrimary) = True

    End If

End With

See also


Chart Object

© 2018 Microsoft