+ Reply to Thread
Results 1 to 2 of 2

Stop running all commands

  1. #1
    Registered User
    Join Date
    12-23-2008
    Location
    USA
    Posts
    60

    Stop running all commands

    If the program decides the user has done something wrong, I don't want to just "exit sub" because then in every function above the current function I'd have to check an "exit" flag and then exit those functions as well until it gets to the big outer function.

    Is there an "stop all" command?

    Dave

  2. #2
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,436

    Re: Stop running all commands

    You could use END.
    But that will clear all variables in memory, which might not be just yours.

    The help file says this as a warning.
    Note
    The End statement stops code execution abruptly, without invoking the Unload, QueryUnload, or Terminate event, or any other Visual Basic code. Code you have placed in the Unload, QueryUnload, and Terminate events of forms and class modules is not executed. Objects created from class modules are destroyed, files opened using the Open statement are closed, and memory used by your program is freed. Object references held by other programs are invalidated.
    Cheers
    Andy
    www.andypope.info

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1