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.
A GoTo to any label within a Catch or Finally block of a Try…Catch…Finally construct from outside the block is not allowed. Also not allowed is any GoTo within a Catch or Finally block to a label outside the block.
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.
Do...Loop Statement | For...Next Statement | GoSub...Return Statement | If...Then...Else Statement | Select Case Statement