NGWS SDK Documentation  

This is preliminary documentation and subject to change.
To comment on this topic, please send us email at ngwssdk@microsoft.com. Thanks!

HxLink DID NOT INITIALIZE

Exit Statement

Exits a block of Do…Loop, For...Next, Try…Catch…Finally, Function, Sub, or Property code.

Exit Do
Exit For
Exit Function
Exit Property
Exit Sub
Exit Try

Forms

Exit Do
Provides a way to exit a Do...Loop statement. It can be used only inside a Do...Loop statement. Exit Do transfers control to the statement following the Loop statement. When used within nested Do...Loop statements, Exit Do transfers control to the loop that is one nested level above the loop where Exit Do occurs.
Exit For
Provides a way to exit a For loop. It can be used only in a For...Next or For Each...Next loop. Exit For transfers control to the statement following the Next statement. When used within nested For loops, Exit For transfers control to the loop that is one nested level above the loop where Exit For occurs.
Exit Function
Immediately exits the Function procedure in which it appears. Execution continues with the statement following the statement that called the Function.
Exit Property
Immediately exits the Property procedure in which it appears. Execution continues with the statement following the statement that called the Property procedure.
Exit Sub
Immediately exits the Sub procedure in which it appears. Execution continues with the statement following the statement that called the Sub procedure.
Exit Try
Immediately exits the Catch block in which it appears within a Try…Catch…Finally structure. Execution continues with the statement following the End Try statement.

Remarks

Do not confuse Exit statements with End statements. Exit does not define the end of a structure.

See Also

Example

Do...Loop Statement | End Statement | For Each...Next Statement | For...Next Statement | Function Statement | | Stop Statement | Sub Statement | Try ... Catch ... Finally Statement | Using For Each...Next Statements | Using For...Next Statements