+ Reply to Thread
Results 1 to 6 of 6

Pass value and add line to multiline textbox

  1. #1
    Registered User
    Join Date
    02-21-2010
    Location
    Italy
    MS-Off Ver
    Excel 2013
    Posts
    77

    Pass value and add line to multiline textbox

    Hi there,
    I'm here to ask again for help since I can't find any solution on the Net coming for help..

    The scenario is the following:
    In a Userform I have a textbox in which the user enters the data.
    Clicking a Command Button I want to pass the inserted data in a destination Multiline Textbox.

    What I've done so far:
    Setting up the Userform with the controls and try to write the following code.

    Please Login or Register  to view this content.
    Problem:
    The values are always overwritten in the same line.

    Any hint?
    In attachment the dummy worksheet.

    thanks in advance!
    P.
    Attached Files Attached Files
    Last edited by fredpox; 04-18-2010 at 05:42 AM. Reason: marked as SOLVED

  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: Pass value and add line to multiline textbox

    To start with your code is in a non-existent button

    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
    Registered User
    Join Date
    02-21-2010
    Location
    Italy
    MS-Off Ver
    Excel 2013
    Posts
    77

    Re: Pass value and add line to multiline textbox

    Hi RoyUK, and thanks for your support! :-)
    The code works great, as usual your hints hit the spot!

    ehm..I'm afraid I didn't understand your comment and the first 'empty' Sub..
    Could you please help me to get the gist of it?

    thanks again!
    have a nice day
    P.

  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: Pass value and add line to multiline textbox

    I thought you had the code in the wrong button -inserttextbox,just ignore it because I've deleted the files now.

    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

  5. #5
    Registered User
    Join Date
    02-21-2010
    Location
    Italy
    MS-Off Ver
    Excel 2013
    Posts
    77

    Re: Pass value and add line to multiline textbox

    It's Ok thanks again

    bye
    P.

  6. #6
    Registered User
    Join Date
    02-21-2010
    Location
    Italy
    MS-Off Ver
    Excel 2013
    Posts
    77

    Re: Pass value and add line to multiline textbox

    I forgot, I may need to insert also another kind of data: what the sub would look like if I add lines to the multiline textbox containing a counter which increments the data in the upper line by 1?
    Say I insert a string with the sub you advised and I want to update another multiline textbox as well with a counter. The 1st line would be 1, the 2nd 2 and so on. How can I count the numbers already inserted in the multiline texbox (i.e. with just 1 line line1+1, if many lines lastline+1)


    thanks again
    P.

+ 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