Welcome to the Excel Forum

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed.

Please Register to Remove these Ads

Please Register to Remove these Ads



Reply
  #1  
Old 02-08-2010, 10:54 PM
adjustermn adjustermn is offline
Registered User
 
Join Date: 08 Feb 2010
Location: Miami, Fl
MS Office Version:Excel 2007
Posts: 4
adjustermn is becoming part of the community
Userform: Pass textbox values to another textbox on button press

Please Register to Remove these Ads

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
Reply With Quote
  #2  
Old 02-09-2010, 03:38 PM
jasoncw jasoncw is offline
Forum Guru
 
Join Date: 29 Dec 2004
Location: Michigan, USA
MS Office Version:2003
Posts: 2,164
jasoncw has an addiction to Excel
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:

Code:
Textbox5 = Textbox1 & vbCrLf & Textbox2 & ", " & Textbox3 & " " & Textbox4
HTH,
Jason
Reply With Quote
  #3  
Old 02-09-2010, 03:52 PM
adjustermn adjustermn is offline
Registered User
 
Join Date: 08 Feb 2010
Location: Miami, Fl
MS Office Version:Excel 2007
Posts: 4
adjustermn is becoming part of the community
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
Reply With Quote
  #4  
Old 02-09-2010, 10:19 PM
jasoncw jasoncw is offline
Forum Guru
 
Join Date: 29 Dec 2004
Location: Michigan, USA
MS Office Version:2003
Posts: 2,164
jasoncw has an addiction to Excel
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 With Quote


Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off

Forum Jump