Solved

Moving text between textboxes

Posted on 2006-10-20
3
232 Views
Last Modified: 2010-04-23
I have a form with two textboxes and two buttons and want to do the following:

When btnPush1 is selected, the contents of txtBox1 are copied to txtBox2, and when btnPush2 is pressed, the contents of txtBox2 are copied to txtBox1.

I know it has something to do the textbox properties, but I'm extremely new at this and can't figure it out...

Thanks
0
Comment
Question by:jlavetan
  • 2
3 Comments
 
LVL 13

Accepted Solution

by:
newyuppie earned 50 total points
ID: 17778524
do these work for you?


private sub btnPush1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnPush1.Click
      txtbox2.text = textbox1.text
end sub

private sub btnPush2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnPush2.Click
      txtbox1.text = textbox2.text
end sub


NY
0
 
LVL 1

Author Comment

by:jlavetan
ID: 17778548
Yep, that was it...  I could of sworn I had that... I guess I had some syntax wrong...

Thanks!
0
 
LVL 13

Expert Comment

by:newyuppie
ID: 17778580
glad it worked out! thanks for the grade

NY
0

Featured Post

Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
VB.NET bulk update  of a table from another table 4 45
vb.net help 4 31
VB.Net - Get ColumnNames of SQL Table 4 13
VB.NET 2008 Winforms Signing 13 20
It’s quite interesting for me as I worked with Excel using vb.net for some time. Here are some topics which I know want to share with others whom this might help. First of all if you are working with Excel then you need to Download the Following …
Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

809 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question