Tick Mark Related Properties

The Axis object has several properties related to tick marks. The MajorTickMark property returns or sets the type of major tick mark for the specified axis, and the MinorTickMark property does the same for minor tick marks. Each of these properties can assume any value from the following enum:

Enum XlTickMark xlTickMarkNone = -4142 xlTickMarklnside = 2 xlTickMarkOutside = 3

xlTickMarkCross = 4 End Enum

The TickMarkSpacing property returns or sets the number of categories or series between tick marks. This applies only to category and series axes (for 3-D charts). To set the tick mark spacing on a value axis, we can use the MajorUnit and MinorUnit properties (described later in this chapter).

There are also several properties related to tick-mark labels. The TickLabels property returns a TickLabels object that represents the tick-mark labels for the specified axis.

The TickLabelPosition property returns or sets the position of tick-mark labels on the specified axis. It can be one of the following XlTickLabelPosition constants:

Enum XlTickLabelPosition xlTickLabelPositionNone = -4142 xlTickLabelPositionLow = -4134 xlTickLabelPositionHigh = -4127 xlTickLabelPositionNextToAxis = 4 End Enum

The TickLabelSpacing property returns or sets the number of categories or series between tickmark labels. This property applies only to category and series axes (for 3-D charts). Note that Excel determines label spacing on all value axes.

0 0

Post a comment