When you show a form, it creates an implicit instance of that class, so in
good programming practice you should release that object at the end.
As an example, consider a form with this code
Private Sub cmdQuit_Click()
Me.Hide
End Sub
Private Sub UserForm_Activate()
MsgBox "Activate"
End Sub
Private Sub UserForm_Initialize()
MsgBox "Initialize"
End Sub
and then you use this code to show it
UserForm1.Show
UserForm1.Show
Set UserForm1 = Nothing
UserForm1.Show
The first Show will MsgBox Initialize and the Activate, the second only the
Activate as it is already in memory, but then you clear out the form
instance, so the third show MsgBox the Initialize and Activate.
I use a variation along these lines
Dim myForm As UserForm1
Set myForm = New Userform1
With myForm
'do initialisation stuff
.Show
'do tidy-up stuff
End With
Set myForm = Nothing