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!

XP gives error when app ends 1

Status
Not open for further replies.

biddingbong

IS-IT--Management
Sep 10, 2004
67
MU
Windows XP gives me an error when I click on the "Exit" button found on my login screen.
I've got an MDI form which has a menu, when I exit from the menu, there's no error. And I usie the same code in the login screen.

When I click on more details, the error seems to come from kernel32.dll

Any idea what's causing this?
 
Can you please provide the code that is in the exit button click-event?

Matt
 
Dim intExit As Integer

intExit = MsgBox("Do you wish to exit?", vbQuestion + vbYesNo, App.Title)

If intExit = vbYes Then

If objFunctions.objConn.State = adStateOpen Then

objFunctions.objConn.Close

Set objFunctions.objConn = Nothing

End If

End

End If
 
Don't use END

use something like
Code:
dim f as form
for each f in forms
unload f
next

END is brute force closing and doesn't allow cleanup code to execute



Take Care

Matt
If at first you don't succeed, skydiving is not for you.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top