by Darkhacka (3 Submissions)
Category: Custom Controls/Forms/Menus
Compatability: VB 6.0
Difficulty: Unknown Difficulty
Originally Published: Fri 2nd February 2001
Date Added: Mon 8th February 2021
Rating:
(1 Votes)
Unload all forms at once
API Declarations
No Declaration...
'This function unloads all loaded forms
'Usage: UnloadAll Me
Dim i As Integer
While Forms.Count > 1
' Find first form besides "Active Form" to unload
i = 0
While Forms(i).Caption = ActiveFrmName.Caption
i = i + 1
Wend
Unload Forms(i)
Wend
' Last thing to be done...
Unload ActiveFrmName
End
End Function