Solved

Moving text between textboxes

Posted on 2006-10-20
3
233 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

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Introduction When many people think of the WebBrowser (http://msdn.microsoft.com/en-us/library/2te2y1x6%28v=VS.85%29.aspx) control, they immediately think of a control which allows the viewing and navigation of web pages. While this is true, it's a…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
This video shows how to quickly and easily add an email signature for all users on Exchange 2016. The resulting signature is applied on a server level by Exchange Online. The email signature template has been downloaded from: www.mail-signatures…

860 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