• Welcome to Overclockers Forums! Join us to reply in threads, receive reduced ads, and to customize your site experience!

I want to combine the data from 3 textbox into one textbox.

Overclockers is supported by our readers. When you click a link to make a purchase, we may earn a commission. Learn More.

Rw3978748

New Member
Joined
Jan 3, 2015
Can someone help a NewBee out I created a form with the contact information. I would like to create a separate text box displaying the text boxes with the first last and telephone number i it so I can use the copy button to copy just those three text box. Any suggestions would be greatly appreciated.


Using
VB 6
 
Something like this should work:
Code:
textBox4.Text = "Name: " + firstname.Text + " " + "lastname.Text" + VbCrLf + "Phone Number: " + phoneNumber.Text

Output should be something like:
Code:
Name: John Smith
Phone Number: (555)-555-5555

Alternatively you can probably just assign your clipboard data directly by concatenating your three textboxes when a "Copy" button is pressed.. something like:
Code:
Clipboard.Clear()
Clipboard.SetText("Name: " + firstname.Text + " " + "lastname.Text" + VbCrLf + "Phone Number: " + phoneNumber.Text)


Untested, but should be something like that.
 
Back