Results 1 to 9 of 9

Thread: Failure to exit program

  1. #1

    Thread Starter
    Lively Member
    Join Date
    May 1999
    Location
    Atlanta, GA
    Posts
    75

    Post

    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.

  2. #2
    Former Admin/Moderator MartinLiss's Avatar
    Join Date
    Sep 1999
    Location
    San Jose, CA
    Posts
    33,431

    Post

    Put a breakpoint on the Unload Me line and step through the code to see what is happening.

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

  3. #3

    Thread Starter
    Lively Member
    Join Date
    May 1999
    Location
    Atlanta, GA
    Posts
    75

    Post

    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.

  4. #4

    Thread Starter
    Lively Member
    Join Date
    May 1999
    Location
    Atlanta, GA
    Posts
    75

    Post

    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.

  5. #5
    Former Admin/Moderator MartinLiss's Avatar
    Join Date
    Sep 1999
    Location
    San Jose, CA
    Posts
    33,431

    Post

    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

  6. #6
    Guru Clunietp's Avatar
    Join Date
    Oct 1999
    Location
    USA
    Posts
    1,844

    Post

    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

  7. #7

    Thread Starter
    Lively Member
    Join Date
    May 1999
    Location
    Atlanta, GA
    Posts
    75

    Post

    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

  8. #8
    Guru Clunietp's Avatar
    Join Date
    Oct 1999
    Location
    USA
    Posts
    1,844

    Post

    I would guess the Inet control....try removing it and see what happens...

  9. #9
    Guest

    Post

    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: [email protected]
    ICQ: 15440110
    Homepage: http://www.azzmodan.demon.nl




Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width