Results 1 to 2 of 2
  1. #1
    Join Date
    Nov 2003
    Posts
    104

    Unanswered: how to exit a sub prematurely?

    Hi All, I am trying to acheive what the following c/c++/java code can acheive, only in VBA.
    How can I do this?

    Code:
    void funct(void)
    {
    
          if(some condition == false
          {
              return;//exit prematurely
           }//end if
           //otherwise
           code
            code
               code
    }//end of function
    How can this be done?

    Note: I am trying to exit a SUB not a function!

  2. #2
    Join Date
    Nov 2003
    Posts
    104
    Never Mind. For future refference it is
    [b]
    Exit Sub
    [/b

    Sorry, but I figured this out myself

Posting Permissions

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