Jim Mack presented the following explanation :
>> I load a Form from my Main Form using
>>
>> Main Form Globals
>> Dim fAbout = frmAbout
>>
>> Main Form Sub
>> Sub AboutOpen()
>>
>> If fAbout Is Nothing Then
>> Set fAbout = New frmAbout
>> End If
>> fAbout.Show , Me
>>
>> End Sub
>>
>> Then I close the form in frmAbout using the Form_Unload event.
>>
>> But the form is not out of memory.
>>
>> If I put
>>
>> Set fAbout = Nothing
>>
>> in the frmAbout Form_Unload event then the form does go out of memory.
>
> Maybe I'm missing something, but in this example fAbout and frmAbout are two
> different objects. If there's a "frmAbout" about, closing it would have no
> effect on fAbout.
>
> FWIW, "Dim fAbout = frmAbout" is bad syntax. I assume you mean "as" instead
> of "="
Oops, yes code is AS not =
frmAbout is the form.
fAbout is the instance of frmAbout
Nothing is done to frmAbout.
--
Noah's Ark was built by amateurs,
The Titanic was built by professionals.
Row, row, row your boat gently down the stream ...
Life is but a dream!