+ Reply to Thread
Results 1 to 4 of 4

newline in a textbox vba

  1. #1
    Registered User
    Join Date
    04-17-2013
    Location
    Tunisia
    MS-Off Ver
    Excel 2010
    Posts
    13

    Red face newline in a textbox vba

    Hello everyone
    Can anyone tell me please how to make a newline in a textbox vba if the text entered is longer than the lenght of the TextBox.
    Thank you.

  2. #2
    Registered User
    Join Date
    11-27-2012
    Location
    Alabama
    MS-Off Ver
    Excel 2003
    Posts
    53

    Re: newline in a textbox vba

    Please Login or Register  to view this content.

  3. #3
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643

    Re: newline in a textbox vba

    Where is the textbox located and how was it created?

    If it's a textbox Shape on a worksheet you can just press ENTER to get a new line.

    If it's an ActiveX textbox on a worksheet (or a textbox on a userform) set the MultiLine property to True and EnterKeyBehaviour to True and you can also use ENTER.
    If posting code please use code tags, see here.

  4. #4
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,169

    Re: newline in a textbox vba

    Hi,

    I was thinking it was the Visual Basic constant of "vbCrLf" instead of "Newline" .

    See http://www.programmersheaven.com/mb/...and-vbnewline/

    It looks like either will work, depending on the platform.

    See more about Visual Basic Constants at http://msdn.microsoft.com/en-US/libr...(v=vs.80).aspx
    One test is worth a thousand opinions.
    Click the * Add Reputation below to say thanks.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1