Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium


Programmatically changing Chart axis text orientation

Posted on 2003-02-25
Medium Priority
Last Modified: 2012-06-27
Is it possible to programmatically change the chart axis text orientation in excel/vba?

I need to be able to do change the orientation in the same as right-clicking on a chart axis and then selecting:
Format Axis...
Alignment tab
And the moving the pointer to indicate orientation of text

Question by:JKA
1 Comment

Accepted Solution

bullethead earned 600 total points
ID: 8017884
What you need is:

Sub ChangeOrient()
    ActiveChart.Axes(xlCategory).TickLabels.Orientation = 45
End sub

for example, to set an angle of 45 degrees.

As a more general tip - if you record yourself doing something in Excel by going to Tools\Macro\Record, youc an find out what you need to know and learn VBA in the process.

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Microsoft Office Picture Manager was included in Office 2003, 2007, and 2010, but not in Office 2013. Users had hopes that it would be in Office 2016/Office 365, but it is not. Fortunately, the same zero-cost technique that works to install it with …
In this post, we will learn to set up the Group Naming policy and will see how it is going to impact the Display Name and the Email addresses of the Group.
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…
Look below the covers at a subform control , and the form that is inside it. Explore properties and see how easy it is to aggregate, get statistics, and synchronize results for your data. A Microsoft Access subform is used to show relevant calcul…

580 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question