The Crosses property returns or sets the point on the specified axis at which the "other" axis crosses—that is (we surmise), the other axis that is in the same axis group. Thus, if the specified axis is a primary axis, so is the other axis. If the specified axis is a secondary axis, so is the other axis. For instance, the code:
ActiveChart.Axes(xlValue, xlPrimary).Crosses = xlAxisCrossesMaximum instructs the primary category axis (the other axis) to cross the primary value axis (the specified axis) at the maximum point of the primary value axis (the specified axis).
The Crosses property can assume one of the following XlAxisCrosses constants:
Enum XlAxisCrosses xlAxisCrossesCustom = -4114 xlAxisCrossesAutomatic = -4105 xlAxisCrossesMaximum = 2 xlAxisCrossesMinimum = 4 End Enum
When set to xlAxisCrossesAutomatic, Excel determines the crossing point. When set to xlMinimum , the other axis crosses at the minimum value when the specified axis is a value axis or the far-left category when the specified axis is a category axis. When set to xlMaximum , the other axis crosses at the maximum value when the specified axis is a value axis or the far-right category when the specified axis is a category axis. (Unfortunately, this property does not always seem to act as advertised. In particular, I have noticed that setting this property to xlMinimum does not always adjust the crossing point properly.)
Finally, the xlAxisCrossesCustom setting applies only to value axes, in which case when set to xlAxisCrossesCustom , the CrossesAt property determines the crossing point for the other (category) axis. Note that setting the CrossesAt property automatically sets the Crosses property to xlAxisCrossesCustom .
For instance, referring to the CreateChart procedure, the code: co.Chart.Axes(xlValue).CrossesAt = 50 causes the category axis to cross the value axis at 50.
Finally, note that these properties do not apply to 3-D charts.
Was this article helpful?