Have you tried changing the :


Unload Form1

Set Form1 = Nothing


in the Form1 code to using the 'Me' keyword ?


Actually, I doubt that using 'Set Form = Nothing' in the Form's Unload procedure would do anything - the Form is still loaded afterall, even if it is unloading at that point.


VB Cannot clear down any memory held by your form if it's still in the unloading stage.


How are you handling the creation of your forms ? I take it they are modeless (ie. you can open many of them at one time).


You may need some kind of unload-notification code which can tell your main form to set the references to the existing form to nothing.


Regards


Chris Eastwood


CodeGuru - the website for developers

http://www.codeguru.com/vb