GOTO linelabel

Transfers control to the subroutine indicated by the line label.

linelabelThe line label or line number you want to jump to.

* The line label must be inside the current subroutine.
* This statement is provided for backwards compatibility and should not be used.
* Instead of using this statement you should divide your subroutine into smaller components.
* Using this statement will create Spaghetti Code
* For the Microsoft documentation refer to

Public Sub GoTo_Example() 
Dim number As Integer
    number = 2
    If number = 1 Then
        GoTo LineLabel1
    End If

    GoTo LineLabel2



End Sub

© 2024 Better Solutions Limited. All Rights Reserved. © 2024 Better Solutions Limited Top