The VBScript Network and Systems Administrator's Cafe

Aug 9 2008   1:57AM GMT

VBScript Statements: Explanation of the While … Wend Statement

Jerry Lees Jerry Lees Profile: 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


 Comment on this Post

There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when other members comment.

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

Share this item with your network: