Results 1 to 6 of 6
  1. #1
    Gold Lounger
    Join Date
    Jan 2004
    Location
    Italy
    Posts
    3,245
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Autofit text in textbox (2000 sr 1)

    ... how to autofit a text into textbox...
    In effect i have a little textbox and this is filled with:
    Me.TextBox19.Value = Sheets("RATE").Cells(RIGA, "T").Value
    the string contain:aaaaaaaaaaaaaaaaaaaabbbbbbbbbbbbbbbbbbbbbb bbbbbbddddddddddddddddddddddggggggggggggggg....

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Autofit text in textbox (2000 sr 1)

    If the contents of the text box is a long string without spaces and line feeds, there is not much autofitting to be done.

    BTW is this a text box in a userform, or a text box on a worksheet?

  3. #3
    Gold Lounger
    Join Date
    Jan 2004
    Location
    Italy
    Posts
    3,245
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Autofit text in textbox (2000 sr 1)

    I am sorry, is into a userform...

  4. #4
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Autofit text in textbox (2000 sr 1)

    I don't know how to do that; I think it would be very complicated.

    You can set the Multiline property of the text box to Yes and the Scrollbars property to 2 - fmScrollBarsVertical. The text box will be able to display many lines.

  5. #5
    Gold Lounger
    Join Date
    Jan 2004
    Location
    Italy
    Posts
    3,245
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Autofit text in textbox (2000 sr 1)

    ... nice, work! but a set true the p

  6. #6
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Autofit text in textbox (2000 sr 1)

    The WordWrap property of the text box should be set to True.

Posting Permissions

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