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
B4J Tutorial [B4X] Resumable Subs - Sleep / Wait For
B4A Code Snippet [B4X] Bytes To File
B4A Tutorial [B4X] OkHttpUtils2 with Wait For
  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...