|
-
Feb 12th, 2004, 02:19 PM
#1
Thread Starter
Lively Member
Easy Question RE: Manipulating one form from another
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()?
-
Feb 12th, 2004, 03:02 PM
#2
Frenzied Member
One way is to declare frm2 as a module level variable, then you can access it anywhere in form1.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|