Put this routine in a code module and call it in the exit section of your program
Public Sub UnloadAll()
'------------------------------------------------------------
' Procedure: UnloadAll
' Purpose: To Unload all forms once the program finishes
' Input parameters: None
'
' Output parameters:None
'
' Return Value:None
' Author: PETER PILUK
' Date: 06/11/00
'------------------------------------------------------------
Dim f As Integer
f = Forms.Count
Do While f > 0
Unload Forms(f - 1)
If f = Forms.Count Then Exit Do
f = f - 1
Loop
End Sub
Comments