0

How to transfer value of a textbox from Form1 to another?
I coded how to launch forms using Menustrip and now, transferring values but I can't code that beacause I don't know.
I have a button on form1:

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
    //What should I put here?
End Sub
conquistador
  • 673
  • 3
  • 11
  • 35

1 Answers1

1

The easiest thing would be to make the textbox property 'modifier' to 'Public'. This would allow it to be visible from the other forms then you simpily impliment the following code;

 Dim form1 As New Form1()

 Dim a As String = form1.Textbox1.Text
Cubsoft
  • 1,147
  • 1
  • 10
  • 32