Using Loops to Repeat Code
Looping let you to run a group of statements repeatedly. Some loops repeat statements till a condition are False; others repeat statements till a condition are True. There are also loops which repeat statements a specific number of times.
The following looping statements are obtainable in VBScript:
Do...Loop: Loops while or until a condition is True.
While...Wend: Loops while a condition is True.
For...Next: Uses a counter to run statements a particular number of times.
For Each...Next: Repeats a group of statements for each item in collection or each element of an array.