+ Reply to Thread
Results 1 to 3 of 3

Ending without 'End'

  1. #1
    Forum Contributor
    Join Date
    10-04-2004
    MS-Off Ver
    2013
    Posts
    148

    Ending without 'End'

    Hi

    Can someone tell me how can I stop code execution without using the 'End' statement?

    I have several subs and they all call the same function which determines wether code execution should continue or not. I can't use the 'Exit' statement since it will only stop execution in the current function...

    Thanks for your time...

  2. #2
    Registered User
    Join Date
    08-16-2007
    Location
    Portsmouth, UK
    Posts
    86
    The way I've delt with this is to define a variable mine is called IERROR as boolean, and then set this to True if the function should stop code execution. then in the sub that calls the function, in the line after the function I have

    Please Login or Register  to view this content.
    hope that helps

  3. #3
    Forum Contributor
    Join Date
    10-04-2004
    MS-Off Ver
    2013
    Posts
    148
    It is a good solution and I had already thought of something like that.

    I just wanted to avoid code replication through every Sub.

    Anyways, thank you!!!

+ 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