Results 1 to 5 of 5

Thread: Unload and End

  1. #1
    Guest

    Post

    As far as I understand, the End command should never be used to end a program. It apparently leaves crap in memory. We are instead supposed to use Unload. If this is the case does the End command have another use or does MS refuse to remove a bad command?

  2. #2
    Fanatic Member Wen Lie's Avatar
    Join Date
    Jul 1999
    Location
    Singapore
    Posts
    524

    Post

    Dear Nookta,

    As long as I know about VB, the End command is just used to end your application.
    No other use I think.

    Just read your MSDN Help File, I'm sure it will help u a lot.

    Regards,
    Wille

  3. #3
    Hyperactive Member
    Join Date
    Jan 1999
    Location
    Rotterdam, Netherlands
    Posts
    386

    Post

    If you use the End command, the form_queryunload and form_unload events are not called (maybe some others too...) and since you usually clean up the mess you made in the form_unload, it's not so smart to use the end statement... I've seen some ppl using the end because the program didn't stop when they did Unload Me (or Unload FormName) but that indicates something is not going well in your app... I think End is available for backwards compatibility.. try not to use it...

  4. #4
    Member
    Join Date
    Jul 1999
    Posts
    40

    Post

    Yes, end usually means the programmer has a conflict and has not closed out properly.

    Unload Form1
    Set Form1 = Nothing

  5. #5
    Lively Member
    Join Date
    Jul 1999
    Posts
    99

    Post

    i think end should only be used when there is a need for immediate termination of the program. otherwise use unload to perform some clean-up tasks in the unload and terminate events.

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