Crosses Property

Microsoft Office Web Components Visual Basic

Returns or sets a value that indicates how the specified axis crosses another axis. Read/write ChartAxisCrossesEnum .

expression.Crosses

expression    Required. An expression that returns a ChAxis object.

Example

This example sets the category axis to cross the value axis at value zero (0) in the chart workspace if a custom crossing point has not already been set for the category axis.

Sub Format_Axis()
    Dim chConstants
    Dim axValueAxis
    Dim axCategoryAxis

    Set chConstants = ChartSpace1.Constants
    
    Set axValueAxis = ChartSpace1.Charts(0).Axes(chConstants.chAxisPositionValue)
    Set axCategoryAxis = ChartSpace1.Charts(0).Axes(chConstants.chAxisPositionCategory)
    
    If axCategoryAxis.Crosses = chConstants.chAxisCrossesAutomatic Then
        axValueAxis.CrossingAxis = axCategoryAxis
        axCategoryAxis.CrossesAtValue = 0
    End If

End Sub