e.g
if Form1 is open then Unload Form1
if Form7 is open then Unload Form7
etc, any ideas how?
Printable View
e.g
if Form1 is open then Unload Form1
if Form7 is open then Unload Form7
etc, any ideas how?
You can see it using loop thru the Forms Collection...
Then unload it..
I think somebody few hours ago posted something like that here...
Check my replies in this thread .
Here it is...
VB Code:
Option Explicit Private Sub Form_Activate() Dim frm As Form For Each frm In Forms If frm.Name = "Form1" Or frm.Name = "Form7" Then Unload frm End If Next End Sub
thanks, could i put that code in a module and do
Call Form_Activate in the function of my form?
Form_Activate is an event in all forms and fires when the form is loaded.Quote:
Originally Posted by Pouncer
The question is: at what point in your application do you need to know whether these forms are still loaded?
You meant to say Activated, didn't you Hack?Quote:
Originally Posted by Hack