Siebel VB Language Reference > Siebel VB Language Reference >

Do...Loop Statement


This standard VB control structure repeats a series of program lines as long as (or until) an expression is TRUE.

Syntax A

Do [{ While|Until } condition]

statement_block

[Exit Do]

statement_block

Loop

Syntax B

Do

statement_block

[Exit Do]

statement_block

Loop [{ While|Until } condition]

Placeholder
Description
condition
Any expression that evaluates to TRUE (non-zero) or FALSE (0)
statement_block
Program lines to repeat while (or until) condition is TRUE (non-zero)

Returns

Not applicable

Usage

When an Exit Do statement is executed, control goes to the statement after the Loop statement. When used within a nested loop, an Exit Do statement moves control out of the immediately enclosing loop.

Example

For examples, read Dir Function, Eof Function, and Err Function.

See Also

Exit Statement
Stop Statement
While...Wend Statement


 Siebel VB Language Reference
 Published: 18 June 2003