alignment of SOME text in a textbox
"Dom" wrote in message
...
[ ]
I'm using 2007. Are we talking about the same thing? By textbox, I
mean the textbox shape, what you get from the INSERT ribbon. Not the
multiline text box you might see on a form. Also, you must have an
actual new line, not just text that has wrapped automatically. For
example, try "This is<CRa new line". You can make "This is" align
left, and "a new line" align right.
-----------
Using the xl2010 macro recorder, I get this:
ActiveSheet.Shapes.AddTextbox(msoTextOrientationHo rizontal, 153,
38.25, 150, _
144.75).Select
Selection.ShapeRange(1).TextFrame2.TextRange.Chara cters.Text = _
"This is " & Chr(13) & "A new Line" & Chr(13) & ""
With Selection.ShapeRange(1).TextFrame2.TextRange.Chara cters(1, 9).
_
ParagraphFormat
.FirstLineIndent = 0
.Alignment = msoAlignRight
End With
HTH!
--
Clif McIrvin
(clare reads his mail with moe, nomail feeds the bit bucket :-)
|