While Loops (VBScript)
A while loop in VBScript takes on a form that is more commonly recognized as a do…while loop. The most basic syntax is:
Dim Counter
Dim Continue
Counter = 0
Do
Counter = Counter + 1
Continue = InputBox("Do you want to continue counting? (Enter 'y' for yes)")
Loop While Continue = "y"
MsgBox(Counter)
page revision: 1, last edited: 18 May 2008 23:49