While Statement[]
The code in a while block is executed as long as the conditional expression does not evaluate to False.
While-Wend Statement[]
While Dirty Self.Clean Wend
Would mean as long as the "Dirty" is True, "Self" will "Clean"
Do-While Statement[]
Sometimes you want the block to be executed at least once.
Dim aName As String Do aName = InputBox("What is your name?") Loop While aName = "" MsgBox "Hello " & aName
This would ask for a name, but if they gave nothing it would try again. Then it would say "Hello (Name)".
Flow Control | |
If | For | While | Do | Until |
?