Excel - how to rotate column header on its side using VBA with Excel Automation

Hi EE,

Can you pls offer a code snippet to rotate column header on its side?

tx, sandra
mytfeinAsked:
Who is Participating?
 
Rory ArchibaldCommented:
If by column header you mean the text in a range, then it's the Orientation property - for example:
 

xlApp.Activesheet.Range("A1").Orientation = 90

Open in new window

0
 
mytfeinAuthor Commented:
Thx Rory,

It works! tx, s
0
 
mytfeinAuthor Commented:
oh, i put your code in a with.. workseeht:

.Range("H5").Orientation = 90

tx, s
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.