i´m trying to transfer the info that appears on a textbox to a label in another Form.
I wrote this:

Me.form9.label5.text=Form2.textbox3.text

could you please help me
thanks!!

Recommended Answers

All 2 Replies

Create two forms, on form1 put a textbox, label, and button. Copy and paste the code below. You will see a synchronize work.

Private Sub Command1_Click()
Form2.Show
End Sub

Private Sub Text1_Change()
Form2.Label1.Caption = Text1.Text
Label1.Caption = Text1.Text
End Sub

Me.form9.label5.text=Form2.textbox3.text

Firstly your code is incorrect. a Label's text property is referred to as caption in VB6. In your code the following -

With Form2
  .Label1.Caption = Text1.Text
  .Show
End With
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.