Code: Select all
.Tools.Add tcAnnotate
With .Tools.Items(ctr - 1)
.Active = True
With .asAnnotation
.Top = (intRecTop + 5) + (intTextHeight * (ctr - 1))
.Left = intRecLeft
With .Shape
.TextAlignment = taRightJustify
.Transparent = True
.Transparency = 100
.ShapeStyle = fosSquareRectangle
.Font.Color = vbBlue
End With
.Text = Format(macurMoTotals(ctr), "$#,##0")
End With
End With
I'm trying to get them to Right Align with each other, but the above code does not do that. I also tried moving .TextAlignment = taRightJustify above the .shape block, but that doesn't work, either.
How can I fix this code -- or is there a better way, entirely, to add 3 lines of numbers to the chart and have the numbers right aligned to each other?