GoTo Statement
Branches unconditionally to a specified line within a procedure.
Syntax
GoTo line
The required line argument can be any line label or line number.
Remarks
GoTo can branch only to lines within the procedure where it appears.
Note
|
|---|
| Too many GoTo statements can make code difficult to read and debug. Use structured control statements (Do...Loop, For...Next, If...Then...Else, Select Case) whenever possible. |
Example
This example uses the GoTo statement to branch to line labels within a procedure.
|
Note