While...Wend

While <expr>
...
Wend

Conditional loop. Executes while the condition is true.

Parameters

exprAs long as the given expression is true, the loop is executed.

Example

var = 3
While var > 0
  MsgBox(var) # --> 3 --> 2 --> 1
  var = var - 1
Wend

Related

For...Next, Break, Continue