944,031 Members | Top Members by Rank

Ad:
Aug 9th, 2005
0

Textbox To Label

Expand Post »
I wish to if someone types something in a textbox that it shows up in a label..but on another form...so say in the textbox i type in "Sharpy" then "Sharpy" shows up on another form.
Similar Threads
Reputation Points: 10
Solved Threads: 0
Newbie Poster
Sharpy is offline Offline
18 posts
since Aug 2005
Aug 9th, 2005
0

Re: Textbox To Label

thought this could help;
Private Sub Command1_Click()
Form2.Show
Form2.Text1.Text = Form1.Text1.Text
End Sub
Form1 has 2 controls, text1 and command1
Reputation Points: 10
Solved Threads: 0
Newbie Poster
mwaora is offline Offline
5 posts
since Jun 2005
Aug 9th, 2005
0

Re: Textbox To Label

doesn't help me sorry, I want it so when you type in a word in the Text Box and click on a button then it will show up in the next form
Reputation Points: 10
Solved Threads: 0
Newbie Poster
Sharpy is offline Offline
18 posts
since Aug 2005
Aug 9th, 2005
0

Re: Textbox To Label

Change this line:
Form2.Text1.Text = Form1.Text1.Text

to this:
Form2.Label1.Caption = Text1.Text

Or did you not want to use a command button?
You could try Text1_Change, instead of Command1_Click.

If you don't want Form2 to show at this point, then use "Load Form2" earlier, then you can Show or Hide it as you need to.

hope that helps, if not give us a little more explanation of what you want to do.
Reputation Points: 11
Solved Threads: 2
Junior Poster in Training
w00dy is offline Offline
70 posts
since Jun 2005
Aug 9th, 2005
0

Re: Textbox To Label

Thanks its working now
Reputation Points: 10
Solved Threads: 0
Newbie Poster
Sharpy is offline Offline
18 posts
since Aug 2005
Aug 10th, 2005
0

Re: Textbox To Label

Glad I could help
Reputation Points: 11
Solved Threads: 2
Junior Poster in Training
w00dy is offline Offline
70 posts
since Jun 2005
Aug 16th, 2005
0

Re: Textbox To Label

try using the text1.change() event That way it is automatically change whenever you type something
Visual Basic 4 / 5 / 6 Syntax (Toggle Plain Text)
  1. public Sub text1_change()
  2. form1.label1.caption = trim(text1.text)
  3. end sub
Reputation Points: 20
Solved Threads: 5
Junior Poster
jwshepherd is offline Offline
123 posts
since Jun 2005

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in Visual Basic 4 / 5 / 6 Forum Timeline: SQL Server 2000 and VB 6
Next Thread in Visual Basic 4 / 5 / 6 Forum Timeline: Source code downloads





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC