How to change axis value labels orientation? How to change axis value labels orientation? vba vba

How to change axis value labels orientation?


This will change the orientation of the X-axis tick labels.

ActiveChart.Axes(xlCategory).TickLabels.Orientation = 45 ' degrees

This is how to change the orientation of the axis title:

ActiveChart.Axes(xlCategory).AxisTitle.Orientation = 81 ' degrees

Have you ever tried recording macros? If not, you should! Looking at the resulting code is a great way to quickly learn this type of thing.


Layout tab (which appears when you have a chart selected) -> labels -> axis titles.

or

Right click the chart axis -> format axis -> Alignment

or

VBA solution as Jean-François Corbett pointed out