I am building an Excel spreadsheet from VB and would like to rotate the text in selected cells to 45 degrees using VBA code. How can I do this? I have looked at the WordArt and Shape object but could not make sense of them.
Below is my sample code,
In VBA, i hv a module RotateCell :
Public Sub RotateCell()
Sheet1.Range(ActiveCell, ActiveCell.End(xlToRight)).Orientation = 45
In VB, i call RotateCell :
Private Sub CallRotateCell()
Set objExAP = CreateObject("Excel.Application")
The selected text are not rotate when i run the aplication. If i change the orientation value to 90 or -90, then the selected text will rotate.