GoTo Statement [Runtime]/text/sbasic/shared/03090302.xhpSun Microsystems, Inc.converted from old format - fpeGoTo statementGoTo Statement [Runtime]Continues program execution within a Sub or Function at the procedure line indicated by a label.Syntax:see ParametersParameters:Sub/Functionstatement block Label1Label2:statement blockExit SubLabel1:statement blockGoTo Label2End Sub/FunctionUse the GoTo statement to instruct $[officename] Basic to continue program execution at another place within the procedure. The position must be indicated by a label. To set a label, assign a name, and then and end it with a colon (":").You cannot use the GoTo statement to jump out of a Sub or Function.Example:Sub ExampleOnGosubDim iVar As IntegerDim sVar As StringiVar = 2sVar =""On iVar GoSub Sub1, Sub2On iVar GoTo Line1, Line2Exit SubSub1:sVar =sVar & " From Sub 1 to" : ReturnSub2:sVar =sVar & " From Sub 2 to" : ReturnLine1:sVar =sVar & " Label 1"Line2:sVar =sVar & " Label 2"Print sVarEnd Sub