Executes a series of statements as long as a given condition is true.
|condition ||Numeric or string expression that evaluates to true or false. If condition is Null, then condition is treated as false.|
|statements ||One or more statements executed while condition is true.|
, then all statements
are executed until the Wend
statement is encountered. Control then returns to the While
statement and condition
is again checked. If condition
is still true
, then the process is repeated. If it is not true
, then execution resumes with the statement following the Wend
While...Wend loops can be nested to any level. Each Wend matches the most recent While.
: The Do...Loop
statement provides a more structured and flexible way to perform looping.
Counter = 0
While Counter < 20
Counter = Counter + 1