Excel 2007 line chart automatic category axis text rotation

B

Boris

Is there any way in Excel 2007 of re-enabling the automatic (best fit)
rotation feature on category values text axes after you have entered a custom
angle (the simple checkbox that existed in previous versions is no longer
there and the program will not allow you to remove a custom angle completely
once one has been set - only to change it)?
Many thanks, Boris.
 
J

Jon Peltier

You apparently cannot do this through the user interface, but this line of
VBA does it:

ActiveChart.Axes(xlCategory, xlPrimary).TickLabels.Orientation =
xlTickLabelOrientationAutomatic

Select the chart. Open the VB Editor (Alt+F11), then open the Immediate
Window (Ctrl+G). Paste the line above, put the cursor in the line, and press
Enter.

- Jon
 
B

Boris

Thanks Jon, that's very helpful. Pity they didn't just keave the simple
little tickbox that was there but this is quite straight forward so...
Thanks again and best wishes, Boris.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top