+ Reply to Thread
Results 1 to 4 of 4

Userform: Pass textbox values to another textbox on button press

  1. #1
    Registered User
    Join Date
    02-08-2010
    Location
    Miami, Fl
    MS-Off Ver
    Excel 2007
    Posts
    4

    Userform: Pass textbox values to another textbox on button press

    I am trying to pass data entered in several textboxes on to display in another textbox as a string of text in the same userform on button click

    Ex:
    Textbox 1: 123456 E Main St
    Textbox 2: Miami
    Textbox 3: FL
    Textboc 4: 33172

    all data combined to:

    Textbox 5: 123456 E Main St
    Miami, FL 33172


    All the data entered needs to be in a textbox combined as text so i can use the copy and paste button on all the data.

    I would also like to have the textbox have linebreaks so each entry is formated like an address entry.

    Thank you for the help in advance

  2. #2
    Forum Expert
    Join Date
    12-29-2004
    Location
    Michigan, USA
    MS-Off Ver
    2013
    Posts
    2,208

    Re: Userform: Pass textbox values to another textbox on button press

    These are all text boxes on a user form? In the code for the command button, try:

    Please Login or Register  to view this content.
    HTH,
    Jason

  3. #3
    Registered User
    Join Date
    02-08-2010
    Location
    Miami, Fl
    MS-Off Ver
    Excel 2007
    Posts
    4

    Re: Userform: Pass textbox values to another textbox on button press

    Thank you for your help I am still having problems getting this to work (and it's probably my error) I posted this code below in my command button and nothing happens when I click it. Do I need some kind of code in the box everything is combining in?

    Private Sub txtFirstcontact_Click()
    txtFirstcontact = txtlimita & vbCrLf & txtlimitb & ", " & txtlimitc & " " & txtlimitd

  4. #4
    Forum Expert
    Join Date
    12-29-2004
    Location
    Michigan, USA
    MS-Off Ver
    2013
    Posts
    2,208

    Re: Userform: Pass textbox values to another textbox on button press

    Are all 5 text boxes on the same user form? If so, that should work. Could you possibly post up a copy of the document?

+ 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