+ Reply to Thread
Results 1 to 4 of 4

Split text box by Return Character

  1. #1
    Forum Contributor mccrimmon's Avatar
    Join Date
    02-19-2004
    Location
    Scotland
    MS-Off Ver
    2003
    Posts
    249

    Split text box by Return Character

    I have a textbox in my userform which has multiline properties available.

    The user can enter more than one line of data in the text box and can enter a list such as the following:

    Adam
    Brian
    Colin
    David

    I have the following code in the userform.

    Please Login or Register  to view this content.
    The data is split out, however, if there is more than one record it leaves a line gap.

    I have attached an example to show what i mean.

    Is there anyway I can get it so that each line that is entered in the userform is displayed exactly as one line in the relevant cell on the workbook?
    Attached Files Attached Files
    McCrimmon

  2. #2
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200

    Re: Split text box by Return Character

    Try this
    Please Login or Register  to view this content.
    Hope that helps.

    RoyUK
    --------
    For Excel Tips & Solutions, free examples and tutorials why not check out my web site

    Free DataBaseForm example

  3. #3
    Forum Contributor mccrimmon's Avatar
    Join Date
    02-19-2004
    Location
    Scotland
    MS-Off Ver
    2003
    Posts
    249

    Re: Split text box by Return Character

    Quote Originally Posted by royUK View Post
    Try this
    Please Login or Register  to view this content.
    Thanks Roy,
    Simple but yet so effective.

    Rep added and thread solved.

  4. #4
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200

    Re: Split text box by Return Character

    Thanks for the rep,

    If you are satisfied with the solution(s) provided, please mark your thread as Solved.

    How to mark a thread Solved
    Go to the first post
    Click edit
    Click Go Advanced
    Just below the word Title you will see a dropdown with the word No prefix.
    Change to Solved
    Click Save

+ 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