Bookshelf Home | Contents | Index | PDF |
Siebel VB Language Reference > Methods Reference for Siebel VB > Code Control Statements > Go To StatementThe Go To statement is a control structure that directs flow to a label. It does not return a value. The value of the label argument uses the same format as any other Visual Basic name. A reserved word is not a valid label. You cannot use a Go To statement to transfer control out of the current function or subroutine. It is recommended that you avoid using a Go To statement. For more information, see Example 2. FormatThe following table describes the arguments that you can use with this method. Example 1The following example displays the date for one week from the date that the user enters. If the date is not valid, then the Go To statement directs flow to the beginning of the start statement: Sub Button_Click Example 2It is recommended that you avoid using a Go To statement. When possible, you must use another technique. For example, Example 1 could use an If statement that occurs in a separate function that the main code calls. If the test fails, then Siebel VB can call the initial code again. For example: (general) (declarations) Function CheckResponse(Answer) As String Sub Button1_Click |
Siebel VB Language Reference | Copyright © 2015, Oracle and/or its affiliates. All rights reserved. Legal Notices. | |