Hello everyone. I have been studying VB on my own in prep for my class next semester. I am trying to update a label on form1 from form2. Below is just a "test" example i created to figure out what im doing wrong. It is not the actual project i am working on.
this is the form1 code
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim frm2 As New Form2()
frm2.Show()
End Sub
this is the second form code. am i accessing this wrong or declaring something else incorrectly? If you need anymore info,let me know. All i have is one button on the first form opening the second form. This form has a button that when i click it, i want to update the label in form1. Thanks you in advance.
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim frm1 As New Form1()
frm1.lblTest.Text = "Hello"
End Sub