Syntax |
GoSub label |
Description |
Causes execution to continue at the specified label. |
Comments |
Execution can later be returned to the statement following the GoSub by using the Return statement. The label parameter must be a label within the current function or subroutine. GoSub outside the context of the current function or subroutine is not allowed. |
Example |
This example gets a name from the user and then branches to a subroutine to check the input. If the user clicks Cancel or enters a blank name, the program terminates; otherwise, the name is set to MICHAEL, and a message is displayed. Sub Main() CheckName: BlankName: |
See Also |
G |