how unload all forms at the same time or hide all at the same time
thanks for the for who ever does
Yoda (canada eh)
thanks for the for who ever does
Yoda (canada eh)
'Within a form module
Private Sub Form_Activate()
'Form_Activate is a logical place to do this
Dim oFrm As Form
For Each oFrm In Forms
if oFrm.Name <> me.Name and Not _
(TypeOf oFrm Is MDIForm) then Unload oFrm
Next
End Sub
'OR: As a function in a .Bas or .cls module
'use the name of form you don't want unloaded as parameter
Public UnloadAllExceptOne(FormToStay as String)
dim oFrm as Form
for each oFrm in Forms
if oFrm.Name <> FormToStay and Not _
(TypeOf oFrm Is MDIForm) then unload oFrm
next
End Sub
Comment