Z
Zoo
I have 'UserForm1' and Module1.
In UserForm1:
Private Sub UserForm_Initialize()
Debug.Print "Initialized"
End Sub
Private Sub UserForm_Terminate()
Debug.Print "Terminated"
End Sub
In Module1:
Sub Main()
Debug.Print "Set UserForm1 to nothing"
Set UserForm1 = Nothing
Debug.Print
Debug.Print "Unload UserForm1"
Unload UserForm1
End Sub
After running 'Main', the result is:
-------------------------
Set UserForm1 to nothing
Unload UserForm1
Initialized
Terminated
In UserForm1:
Private Sub UserForm_Initialize()
Debug.Print "Initialized"
End Sub
Private Sub UserForm_Terminate()
Debug.Print "Terminated"
End Sub
In Module1:
Sub Main()
Debug.Print "Set UserForm1 to nothing"
Set UserForm1 = Nothing
Debug.Print
Debug.Print "Unload UserForm1"
Unload UserForm1
End Sub
After running 'Main', the result is:
-------------------------
Set UserForm1 to nothing
Unload UserForm1
Initialized
Terminated