On form1:Originally posted by Andy
that should work. post the exact code you're using please.
VB Code:
Public frm5 As Form5 Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Dim form5 As New Form5 form5.Show() End Sub
Form 5 loads, with a textbox, I want to change the text in the box using a button on form1.
VB Code:
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click frm5.TextBox1.Text = "hello" End Sub
I get this error message:
Object reference not set to an instance of an object.




Reply With Quote