VBScript Statements: Explanation of the While … Wend Statement
Posted by: Jerry Lees
The While conditional statement is useful because it allows you to repeat a block of code as long as a conditional test is True, rather than just a simple number of times. It is useful in situations where you need to loop through code, but do not know how many times yo need to run the portion of code.
Keep in mind that you must end While statements with a Wend statement.
Here is an example:
test =0
While test<100
test = test +1
Wscript.echo test
Wend



You must be logged-in to post a comment. Log-in/Register