Class Axis (Excel VBA)

The class Axis represents a single axis in a chart.


Dim axi as Axis
Set axi = ActiveChart.Axes(Type:=1)

For Each

Here is an example of processing the Axis items in a collection.


Dim axiAxe As Axis
For Each axiAxe In ActiveChart.Axes()
	
Next axiAxe

Methods

Delete - Deletes the object.

Select - Selects the object.

Properties

AxisBetweenCategories true if the value axis crosses the category axis between categories.

AxisGroup returns the group for the specified axis.

AxisTitle returns an AxisTitle object that represents the title of the specified axis.

BaseUnit returns or sets the base unit for the specified category axis.

BaseUnitIsAuto true if Microsoft Excel chooses appropriate base units for the specified category axis. The default value is True.

Border returns a Border object that represents the border of the object.

CategoryNames returns or sets all the category names for the specified axis as a text array. When you set this property, you can set it to either an array or a Range range that contains the category names. Read/write Variant.

CategorySortOrder

CategoryType returns or sets the category axis type.

Crosses returns or sets the point on the specified axis where the other axis crosses.

CrossesAt returns or sets the point on the value axis where the category axis crosses it. Applies only to the value axis.

DisplayUnit returns or sets the unit label for the value axis.

DisplayUnitCustom if the value of the DisplayUnit property is xlCustom, the DisplayUnitCustom property returns or sets the value of the displayed units. The value must be from 0 through 10E307.

DisplayUnitLabel returns the DisplayUnitLabel object for the specified axis. Returns null if the HasDisplayUnitLabel property is set to False.

Format returns the ChartFormat object.

HasDisplayUnitLabel true if the label specified by the DisplayUnit or DisplayUnitCustom property is displayed on the specified axis. The default value is True.

HasMajorGridlines true if the axis has major gridlines. Only axes in the primary axis group can have gridlines.

HasMinorGridlines true if the axis has minor gridlines. Only axes in the primary axis group can have gridlines.

HasTitle true if the axis or chart has a visible title.

Height returns a Double value that represents the height, in points, of the object.

Left returns a Double value that represents the distance, in points, from the left edge of the object to the left edge of the chart area.

LogBase returns or sets the base of the logarithm when you are using log scales.

MajorGridlines returns a Gridlines object that represents the major gridlines for the specified axis. Only axes in the primary axis group can have gridlines.

MajorTickMark returns or sets the type of major tick mark for the specified axis.

MajorUnit returns or sets the major units for the value axis.

MajorUnitIsAuto true if Microsoft Excel calculates the major units for the value axis.

MajorUnitScale returns or sets the major unit scale value for the category axis when the CategoryType property is set to xlTimeScale.

MaximumScale returns or sets the maximum value on the value axis.

MaximumScaleIsAuto true if Microsoft Excel calculates the maximum value for the value axis.

MinimumScale returns or sets the minimum value on the value axis.

MinimumScaleIsAuto true if Microsoft Excel calculates the minimum value for the value axis.

MinorGridlines returns a Gridlines object that represents the minor gridlines for the specified axis. Only axes in the primary axis group can have gridlines.

MinorTickMark returns or sets the type of minor tick mark for the specified axis.

MinorUnit returns or sets the minor units on the value axis.

MinorUnitIsAuto true if Microsoft Excel calculates minor units for the value axis.

MinorUnitScale returns or sets the minor unit scale value for the category axis when the CategoryType property is set to xlTimeScale.

ReversePlotOrder true if Microsoft Excel plots data points from last to first.

ScaleType returns or sets the value axis scale type.

TickLabelPosition describes the position of tick-mark labels on the specified axis.

TickLabels returns a TickLabels object that represents the tick-mark labels for the specified axis.

TickLabelSpacing returns or sets the number of categories or series between tick-mark labels. Applies only to category and series axes. Can be a value from 1 through 31999.

TickLabelSpacingIsAuto returns or sets whether or not the tick label spacing is automatic.

TickMarkSpacing returns or sets the number of categories or series between tick marks. Applies only to category and series axes. Can be a value from 1 through 31999.

Top returns a Double value that represents the distance, in points, from the top edge of the object to the top of row 1 (on a worksheet) or the top of the chart area (on a chart).

Type returns an XlAxisType value that represents the Axis type.

Width returns a Double value that represents the width, in points, of the object.

AxisTitle - Represents a chart axis title.

Border - Represents the border of an object.

ChartFormat - Provides access to the Office Art formatting for chart elements.

DisplayUnitLabel - Represents a unit label on an axis in the specified chart.

Gridlines - Represents major or minor gridlines on a chart axis.

Range - Represents a cell, a row, a column, a selection of cells containing one or more contiguous blocks of cells, or a 3D range.

TickLabels - Represents the tick-mark labels associated with tick marks on a chart axis.