PDA

Click to See Complete Forum and Search --> : Failure to exit program


Janitor
Jan 2nd, 2000, 11:22 AM
My program hangs everytime it attempts to close. The last two lines are

Unload Me
Exit Sub

And one of these seems to be the culprit. Any help would be appreciated.

MartinLiss
Jan 2nd, 2000, 11:32 AM
Put a breakpoint on the Unload Me line and step through the code to see what is happening.

------------------
Marty

Janitor
Jan 2nd, 2000, 11:39 AM
Actually, I have done that. The Unload Me statement seems to work, but when the Exit Sub line is executed, the program freezes. During debugging, it halts VB; during run, its process won't end.

Janitor
Jan 2nd, 2000, 11:40 AM
Actually, I have done that. The Unload Me statement seems to work, but when the Exit Sub line is executed, the program freezes. During debugging, it halts VB; during run, its process won't end.
I was hoping that someone had seen this before (like I am leaving something open in the background of the program to cause this), and could give me a hand.
Thanks for your help, though.

MartinLiss
Jan 2nd, 2000, 11:45 AM
If you want to, send me a zip file of your project and I'll take a look at it. (I won't get a chance to do anything with it until tomorrow night.)

------------------
Marty

Clunietp
Jan 2nd, 2000, 12:16 PM
try this on your unload, possibly some other forms are still loaded, preventing the termination of your app....

on error resume next
dim frm as form

for each frm in form
if frm.Caption <> me.caption then
unload frm
end if
next frm

unload me

Janitor
Jan 2nd, 2000, 12:31 PM
Actually, there is only the one form involved (and one module). Would a problem with either of the following keep the program from terminating?

Inet control
Database objects

Clunietp
Jan 2nd, 2000, 12:55 PM
I would guess the Inet control....try removing it and see what happens...

Jan 2nd, 2000, 04:32 PM
Yes it is the inet control. If it is still executing, it will just seem to be stuck. Try canceling the operation(s) before unloading.


------------------

Vincent van den Braken
EMail: azzmodan@azzmodan.demon.nl
ICQ: 15440110 (http://www.icq.com/15440110)
Homepage: http://www.azzmodan.demon.nl