Share via


HasAutoMajorUnit Property

True if the major unit for the specified axis is determined automatically. The default value is True. You should use this property only for value axes. Read/write Boolean.

expression.HasAutoMajorUnit

*expression   * Required. An expression that returns a ChAxis object.

Example

This example sets the major unit for the specified axis if the major unit is currently set to be determined automatically.

Sub SetMajorUnit()
    Dim chtConstants
    dim axs
    
    Set chtConstants = ChartSpace1.Constants
    Set axs = ChartSpace1.Charts(0).Axes(chtConstants.chAxisPositionValue)
    If axs.HasAutoMajorUnit Then axs.MajorUnit = 5000
End Sub

Applies to | ChAxis Object

See Also | AddIn Method | Address Property | HasAutoMinorUnit Property