B4J Question Ending a Sub

Discussion in 'B4J Questions' started by Reinierus, Jun 2, 2015.

Similar threads

B4A Tutorial [B4X] SQL with Wait For
B4J Tutorial SQL Tutorial
B4A Tutorial [B4X] OkHttpUtils2 with Wait For
B4J Tutorial [B4X] Resumable Subs - Sleep / Wait For
B4A Code Snippet [B4X] Bytes To File
  1. Reinierus

    Reinierus Member Licensed User

    Hello.
    Maybe this is an old question, but I need to terminate a Sub, like Exit Sub in VB6.

    Code:
    If vrCursor.NextRow=True Then
            vrCursor.Close
            vrSQL.Close
            
    Exit Sub
    End If
    ' If not, continue with the rest of the sub
    '

    There is a way to do that?

    Thanks a lot
     
  2. Erel

    Erel Administrator Staff Member Licensed User

    Yes.

    Code:
    Sub SomeSub

    If NeedToExitSub Then Return
    End Sub
     
  3. Reinierus

    Reinierus Member Licensed User

    Thanks Erel.
    I will try it

    Best Regards
     
Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice