Align text in a text box

A

Ana

Hi;

I have a text box and I want to justified the text using a macro I have the
following code :


ActiveSheet.Shapes("Text Box 1").Select
Selection.Characters.Text = ""
With Selection.Font
..Name = "Calibri"
..FontStyle = "Regular"
..Size = 9

End With

and it works but I do not know how to justified the text
Anybody knows??

thank you
 
P

Peter T

Dim shp As Shape
Set shp = ActiveSheet.Shapes("Text Box 1")
shp.TextFrame.HorizontalAlignment = xlJustify

Regards,
Peter T
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top