CrossesAt property (Excel Graph)

Returns or sets the point on the value axis where the category axis crosses it. Applies only to the value axis. Read/write Double.

Syntax

expression.CrossesAt

expression Required. An expression that returns one of the objects in the Applies To list.

Remarks

Setting this property causes the Crosses property to change to xlAxisCrossesCustom.

This property cannot be used on 3D charts or radar charts.

Example

This example sets the category axis in the ActiveChart to cross the value axis at value 3.

Sub Chart() 
 
 ' Create a sample source of data. 
 Range("A1") = "2" 
 Range("A2") = "4" 
 Range("A3") = "6" 
 Range("A4") = "3" 
 
 ' Create a chart based on the sample source of data. 
 Charts.Add
 With ActiveChart 
 .ChartType = xlLineMarkersStacked 
 .SetSourceData Source:=Sheets("Sheet1").Range("A1:A4"), PlotBy:= xlColumns 
 .Location Where:=xlLocationAsObject, Name:="Sheet1" 
 End With
 ' Set the category axis to cross the value axis at value 3. 
 ActiveChart.Axes(xlValue).Select 
 Selection.CrossesAt = 3
End Sub

Support and feedback

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.