Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
Ana Ana is offline
external usenet poster
 
Posts: 44
Default Align text in a text box

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



  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,600
Default Align text in a text box

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

Regards,
Peter T

"Ana" wrote in message
...
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





  #3   Report Post  
Posted to microsoft.public.excel.programming
Ana Ana is offline
external usenet poster
 
Posts: 44
Default Align text in a text box

Thank you a lot

"Peter T" wrote:

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

Regards,
Peter T

"Ana" wrote in message
...
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






Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
align text?? L.S. New Users to Excel 3 July 30th 09 01:42 AM
How to right-align text and numbers? [email protected] Excel Discussion (Misc queries) 3 November 3rd 08 02:25 AM
Right align partial text in a text box cchristensen Excel Discussion (Misc queries) 2 October 28th 08 03:42 PM
Need to align text around a symbol??? guillemot Excel Worksheet Functions 4 January 18th 06 04:43 PM
How to align text boxes? M.W. Excel Discussion (Misc queries) 1 August 18th 05 12:56 AM


All times are GMT +1. The time now is 07:45 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"