0

This is my code

form1:

public sometext as string

form2:

 Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click  
        textbox1.text = form1.sometext  
    End Sub
Subaz
  • 897
  • 1
  • 9
  • 24

1 Answers1

0

In form 1:

Dim Obj as New Form2
Obj.Str = 'some variable in form 1'
Obj.Show
Me.Hide

In form 2:

Public Property Str as String
Textbox1.text = Str

And for more information you could check this link: How to pass value of a textbox from one form to another form

Sherwin Obciana
  • 319
  • 1
  • 11