PC Review


Reply
Thread Tools Rate Thread

Custom Angle and Alignment with VBA

 
 
baconcow
Guest
Posts: n/a
 
      5th May 2008
In Excel, I am using VBA to create charts. However, I have not figured out
how to use them quite as in-depth. One of the things I cannot recreate is the
following function:

When I click on an axis and go to "Format Axis" and then click
on"Alignment", I can then change the "Text layout".

I want VBA to change it to
Vertical alignment "Middle Centered" (default),
Text direction "Horizontal" (default)
Custom angle "60 degrees" (not default)

Whenever I record a macro and change the custom angle, it never shows up in
the code. Is there a way to do this with VBA? Thanks
 
Reply With Quote
 
 
 
 
baconcow
Guest
Posts: n/a
 
      5th May 2008
Pouring through the different ticklabel objects, I finally found the proper
one:

ch111.Axes(xlCategory, xlPrimary).TickLabels.Orientation = 60

(you need to use +60 if you want an angle of -60, don't know why... and -60
for an angle of +60)

Hope this helps somebody who needs it.

"baconcow" wrote:

> In Excel, I am using VBA to create charts. However, I have not figured out
> how to use them quite as in-depth. One of the things I cannot recreate is the
> following function:
>
> When I click on an axis and go to "Format Axis" and then click
> on"Alignment", I can then change the "Text layout".
>
> I want VBA to change it to
> Vertical alignment "Middle Centered" (default),
> Text direction "Horizontal" (default)
> Custom angle "60 degrees" (not default)
>
> Whenever I record a macro and change the custom angle, it never shows up in
> the code. Is there a way to do this with VBA? Thanks

 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I get from the sine of an angle to the actual angle JungleJim74 Microsoft Dot NET 1 16th Jul 2009 11:56 AM
how do I set custom "spin" angle in a PowerPoint "custom animati =?Utf-8?B?am9obmZyZWRiYXJyeQ==?= Microsoft Powerpoint 1 21st Jul 2005 09:01 PM
Custom Tab Control Alignment Problem lord soth via .NET 247 Microsoft Dot NET Framework Forms 0 18th Mar 2005 06:56 PM
Alignment in Custom Number Formats =?Utf-8?B?RXJpYw==?= Microsoft Excel Misc 1 14th Aug 2004 12:14 AM
How can I set custom vertical alignment for a section? =?Utf-8?B?RWQgVHVnZ3k=?= Microsoft Access Reports 6 11th Feb 2004 12:21 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 06:58 AM.