Results 1 to 7 of 7

Thread: <RESOLVED> Justify text in cell

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Dec 2005
    Posts
    21

    <RESOLVED> Justify text in cell

    Hi all,

    What is the command to align text in a cell but not to left or right, I mean to distribute the text and making the cell height bigger.

    Thanks in advance,

    Y.
    Last edited by yorch; Jul 19th, 2006 at 05:51 PM.

  2. #2
    PowerPoster Static's Avatar
    Join Date
    Oct 2000
    Location
    Rochester, NY
    Posts
    9,390

    Re: Justify text in cell

    Columns("A:A").ColumnWidth = [NUMBER.. ex: 25]

    Range("A1").HorizontalAlignment = xlCenter
    there is also
    xlFill and xlJustify, but they didnt seem to do anything?
    JPnyc rocks!! (Just ask him!)
    If u have your answer please go to the thread tools and click "Mark Thread Resolved"

  3. #3
    Fanatic Member VBAhack's Avatar
    Join Date
    Dec 2004
    Location
    Sector 000
    Posts
    617

    Re: Justify text in cell

    The best way to figure out things like this is to use the macro recorder - start the recorder, perform the tasks you want, stop the recorder, then look at the resulting code.

  4. #4
    PowerPoster Static's Avatar
    Join Date
    Oct 2000
    Location
    Rochester, NY
    Posts
    9,390

    Re: Justify text in cell

    VBAHack!! dont tell them that! c'mon! it makes us seem so smart that we can figure stuff out soooo easily lol

    Macros are your friend
    JPnyc rocks!! (Just ask him!)
    If u have your answer please go to the thread tools and click "Mark Thread Resolved"

  5. #5
    Frenzied Member DKenny's Avatar
    Join Date
    Sep 2005
    Location
    on the good ship oblivion..
    Posts
    1,171

    Re: Justify text in cell

    Doh!
    The secret is out ;-)
    Declan

    Don't forget to mark your Thread as resolved.
    Take a moment to rate posts that you think are helpful

  6. #6

    Thread Starter
    Junior Member
    Join Date
    Dec 2005
    Posts
    21

    <RESOLVED> Justify text in cell

    Thanks all!, actually a friend told me about the macro recorder (something unknown for me) and there I found the exactly answer.

    VB Code:
    1. range("a1:c4").[B]wraptext[/B] = [B]true[/B]


    jejeje, secret revealed. May be you will see me more often answering questions

    Y.

  7. #7
    Fanatic Member VBAhack's Avatar
    Join Date
    Dec 2004
    Location
    Sector 000
    Posts
    617

    Re: <RESOLVED> Justify text in cell

    Oops. I guess I'll be forever ostracized.....

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width