Bookshelf Home | Contents | Index | PDF | ![]() ![]() |
Siebel VB Language Reference > Methods Reference for Siebel VB > Code Control Statements > Exit StatementThe Exit statement is a control structure that stops statements that reside in a loop or transfers control to a calling procedure. It does not return a value. You can include an Exit Do statement in a Do Loop statement. You can use an Exit For statement in a For Next statement. When the Exit statement runs, control transfers to the statement that occurs after the Loop statement or the Next statement. When used in a nested loop, an Exit statement moves control out of the immediately enclosing loop.
FormatExit {Do | For | Function | Sub} ExampleThe following example uses the On Error statement to handle run-time errors. If an error exists, then the code continues at the Debugger label. This example uses the Exit statement to skip the debugging code when no error exists: Sub Button_Click |
![]() ![]() |
Siebel VB Language Reference | Copyright © 2017, Oracle and/or its affiliates. All rights reserved. Legal Notices. | |