Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Wanet Telecoms Ltd on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Process item

Status
Not open for further replies.

Maxi15

Programmer
Feb 24, 2004
5
US
i have a program but when i press the x at the top it doesnt close it disappears but it stays in the process, i put a command button and set its code just to end and it closed and wasn't in the process menu, how can i write the code for the x at the top of the form?

help or any way to make the whole program close

thanks
 
You'll want to unload all the forms in your program and erase all instantiated classes in the Form_Unload() event. Example:

Code:
Private Sub Form_Unload(Cancel as Integer)
    Set clsLocalDataHandler = Nothing ' Instantiated class erased
    
    Unload frmAbout 'Forms unloaded
    Unload frmChat
    End 'Not sure if this is necessary, but it's a habit of mine :)
End Sub
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top