Do Statement
SyntaxGroupDo statements Loop -or- Do {Until|While} condexpr statements Loop -or- Do statements Loop {Until|While} condexpr
Flow ControlDescription
Form 1: Do statements forever. The loop can be exited by using Exit or Goto.See Also
Form 2: Check for loop termination before executing the loop the first time.
Form 3: Execute the loop once and then check for loop termination.
Loop Termination:
For, For Each, Exit Do, While
Sub Main I = 2 Do I = I*2 Loop Until I > 10 Debug.Print I ' 16 End Sub