While Statement

Syntax

While condexpr
    statements
Wend

Group

Flow Control

Description

Execute statements while condexpr is True.

Example


Sub Main
    I = 2
    While I < 10
        I = I*2
    Wend
    Debug.Print I ' 16
End Sub

See also

Do, For, For Each, Exit While