> If I click the Close button the
window closes but the program keeps running. How can I get the program
to recognize that its window has been closed and quit running?
-Harry http://home.netcom.com/~hjsmith
Harry,
I don't consider myself a VB expert but I think your problem is
rather simple. When you click your "Close" button, you're only
closing the Form but not unloading it from memory.
There exists an "Unload" event for a Form. In your Sub
Close_Click() event, you need to call the Unload event. This will
unload your Form from memory.
Private Sub cmdClose_Click()
Unload Me 'or use the name of your Form in place of
Me
End Sub
Or, if you want to completely quit the program by clicking your Close
button try this(after Saving all necessary data, of course):
Private Sub cmdClose_Click()
End
End Sub
Hope this helps.
Peace,
Kris