This seems like it should be really easy, but I just can't figure it out.
So form1 has two buttons, "Open" and "Close". When a user clicks on "Open" it would open form2. When the user clicks on "Close" it would close form2.
My main problem is when the close button is clicked, how do I reference form2. For instance, when "Open" is clicked, there is a line of code that says:
VB Code:
Dim Frm2 As New Form2 Frm2.Show()
How do I declare Form2 in the "Close" method so I can do Frm2.close()?




Reply With Quote