Crosses Property 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 alreadyu been set for the category axis.

Set c = ChartSpace1.Constants
Set valueAxis = ChartSpace1.Charts(0).Axes(c.chAxisPositionLeft)
Set categoryAxis = ChartSpace1.Charts(0).Axes(c.chAxisPositionBottom)
If categoryAxis.Crosses = c.chAxisCrossesAutomatic Then
    valueAxis.CrossingAxis = categoryAxis
    categoryAxis.CrossesAtValue = 0
End If