Solved

Moving text between textboxes

Posted on 2006-10-20
3
234 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Creating Instructional Tutorials  

For Any Use & On Any Platform

Contextual Guidance at the moment of need helps your employees/users adopt software o& achieve even the most complex tasks instantly. Boost knowledge retention, software adoption & employee engagement with easy solution.

Question has a verified solution.

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

Suggested Solutions

If you're writing a .NET application to connect to an Access .mdb database and use pre-existing queries that require parameters, you've come to the right place! Let's say the pre-existing query(qryCust) in Access takes a Date as a parameter and l…
The ECB site provides FX rates for major currencies since its inception in 1999 in the form of an XML feed. The files have the following format (reducted for brevity) (CODE) There are three files available HERE (http://www.ecb.europa.eu/stats/exch…
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…
In an interesting question (https://www.experts-exchange.com/questions/29008360/) here at Experts Exchange, a member asked how to split a single image into multiple images. The primary usage for this is to place many photographs on a flatbed scanner…

697 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