473,320 Members | 1,572 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Text Box In Visual Basic

I would to get codes which copy a content in text box into another one using visual basic 6.0
Sep 22 '07 #1
4 1826
r035198x
13,262 8TB
I would to get codes which copy a content in text box into another one using visual basic 6.0
Moved to Visual basic forum.
Are the texboxes on the same form? Can you post the codes that you have so far?
Sep 22 '07 #2
If you want the text in the first text box to be displayed in the second text box as you write it, you do this:

Expand|Select|Wrap|Line Numbers
  1. Private Sub TextBox1_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TextBox1.TextChanged
  2.     TextBox2.Text = TextBox1.Text
  3. End Sub
Providing that the first text box is called TextBox1 and the second text box is called TextBox2


If you want the text in the first text box to be displayed in the second text box when you press a button, use this:

Expand|Select|Wrap|Line Numbers
  1. Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
  2.     TextBox2.Text = TextBox1.Text
  3. End Sub
Also Providing that the button is called Button1
Sep 22 '07 #3
in vb6:

Expand|Select|Wrap|Line Numbers
  1.  
  2. 'without button
  3. Private Sub Text1_Change()
  4. Text2.Text = Text1.Text
  5. End Sub
  6. '
  7. 'with button
  8. Private Sub Button1_Click()
  9. Text2.Text = Text1.Text
  10. End Sub
  11.  
  12.  
Sep 23 '07 #4
jamesd0142
469 256MB
textbox1.text = textbox2.text

this copies the value in textbox2 into textbox1.
Sep 25 '07 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

4
by: moondaddy | last post by:
Is there a asp.net validator control that validates the length of the text being entered or does everyone just write jscript for this? -- moondaddy@nospam.com
3
by: Bre-x | last post by:
Hi, I have a text file that is made of a number of paragraphs: each paragraph start with either: ":O", ":N", or ":" follow by a 4 digit number and finish with either: M30 or M99 What I need...
5
by: Ash Phillips | last post by:
Ok, I'm not sure how I can explain this but here goes. I have this program that uses a ListView for entries. What I have the program doing is taking all the items from the listview, and writing...
10
by: news.microsoft.com | last post by:
I am new to this so bear with me. I have a set of combo boxes. Lets call them ComboBox1 and ComboBox2. ComboBox1 items are pulled from a table. When a user selects a certain item I want to...
2
by: vsteshenko | last post by:
Hello, This is my first post so I hope I'm doing this correctly. I am currently working on creating an order form for sales associates at my work to be used at conventions. I have a form with...
3
by: sena0112 | last post by:
Hi, I'm a beginner in visual basic and programming. My programme needs to let the user browse for a text file and when the user press a command button, the programme will list out the text file into...
2
by: chaosdl | last post by:
Hello, I am currently using Visual Basic 2005 express edition with a MS Access database. I have made a "Contacts" Form, where the user will be able to enter a members surname and press an OK...
8
by: levi | last post by:
Hallo I have some problems regarding text filtering with Visual Basic. In order to filter only some text lines I want to make a copy of the file as a temporary one, read this copy as a file...
3
by: SteveB | last post by:
I have posted this question in the Visual Basic 2005 and Visual Basic .Net 2005 discussion groups, also. Hi. I am developing an application/web page with VB.Net that will populate a SQL...
3
by: John Meyer | last post by:
The console code is working just fine, but it isn't putting in the text boxes. P.S I'm using a while loop, but I'm only expecting one answer but I haven't found a good way to process one record....
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.