Hi VB friends,
I am a bit confused whenever I use the Unload event...That is because each time we have to unload the form and to release the reference to the form.
My issue is I don't understand very well which is the correct sequence of this process : should I set to nothing the form as a first line of code or simply to unload the form and after that to set it as nothing ? For example I have a second form which I want to unload it properly :
Is this sequence correct or it doesn't matter any order ? On the other hand, the Me argument couldn't be replaced with Form2 (... Unload Form2) ?
Thank you in advance.
I am a bit confused whenever I use the Unload event...That is because each time we have to unload the form and to release the reference to the form.
My issue is I don't understand very well which is the correct sequence of this process : should I set to nothing the form as a first line of code or simply to unload the form and after that to set it as nothing ? For example I have a second form which I want to unload it properly :
Code:
Private Sub Form_Unload(Cancel As Integer)
Unload Me
Set Form2 = Nothing
End Sub
Thank you in advance.