Results 1 to 3 of 3
  1. #1
    Silver Lounger
    Join Date
    Dec 2000
    Location
    California, USA
    Posts
    1,758
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Centering Text in a Label (XP)

    How does one center text in a label object created with the control toolbox?

    The only controls I can locate are Text Align: Left, Center or Right. Is there anything to center Top to Bottom?

    Thanks,
    John

  2. #2
    Bronze Lounger
    Join Date
    Jun 2001
    Location
    New York, New York, Lebanon
    Posts
    1,449
    Thanks
    1
    Thanked 1 Time in 1 Post

    Re: Centering Text in a Label (XP)

    <img src=/S/hello.gif border=0 alt=hello width=25 height=29> John

    I guess from what I gather, the label object is on a user form. If so, I guess the only thing you can do is make many labels and arrange them in the way they will look the way you want.

    Hope this helps.

    Wassim
    <img src=/S/compute.gif border=0 alt=compute width=40 height=20> in the <img src=/S/bagged.gif border=0 alt=bagged width=22 height=22>

  3. #3
    Bronze Lounger
    Join Date
    Nov 2001
    Location
    Arlington, Virginia, USA
    Posts
    1,394
    Thanks
    0
    Thanked 3 Times in 3 Posts

    Re: Centering Text in a Label (XP)

    The TextAlign Property that applies to Label controls has only three options: fmTextAlignLeft, fmTextAlignCenter, and fmTextAlignRight. There's no option to center text vertically. You did not indicate if label is being used on UserForm or on spreadsheet directly. In latter case, you could try using a Textbox object (Drawing toolbar) instead of label, if practical. See attached example. Drawing objects provide a lot more formatting options than most controls available from Control Toolbox toolbar. If using label on UserForm you're stuck with horizontal alignment only.

    HTH

Posting Permissions

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