HasAxis property (Excel Graph)
Returns or sets which axes exist on the chart. Read/write Variant.
expression.HasAxis (Index1, Index2)
expression Required. An expression that returns one of the objects in the Applies To list.
Name | Required/Optional | Data type | Description |
---|---|---|---|
Index1 | Optional | XlAxisType | The type of axis. Can be one of these XlAxisType constants: xlCategory, xlValue, or xlSeriesAxis. Series axes apply only to 3D charts. |
Index2 | Optional | XlAxisGroup | The axis priority. Can be one of these XlAxisGroup constants: xlPrimary or xlSecondary. 3D charts have only one set of axes. |
Graph may create or delete axes if you change the chart type or change the AxisGroup property.
This example turns on the primary value axis.
myChart.HasAxis(xlValue, xlPrimary) = True
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.