Step 1. Introduction about loop
Step 2. Types of loop available in VBS
Step 3. For Loop
Step 4. For each Loop
Step 5. While…. Wend Loop
Step 6. Do while Loop
Step 7. Do Until Loop
Step 8. Loop Control Statements
Step 9. Exit For Statement
Step 10. Exit Do Statement
Step 11. Visit GoLearningBus.Com for more “www.vbsedit.com” training
1.Introduction about loop
A loop statement allows us to execute a statement or group of statements multiple times and following is the general from of a loop statement in VBScript.
2.Types of loop available in VBS
VBScript provides the following types of loops to handle looping requirements.
1) For Loop,
2) For each Loop,
3) While.. Wend Loop,
4) Do While loop,
5) Do until loop.
3.For Loop
Executes a sequence of statements multiple times and abbreviates the code that manages the loop variable. you can see also see example here
4.For each Loop
This is executed if there is at least one element in group and reiterated for each element in a group.
5.While…. Wend Loop
This tests the condition before executing the loop body.
6.Do while Loop
The do..While statements will be executed as long as condition is True.(i.e.,) The Loop should be repeated till the condition is False.
7.Do Until Loop
The do..Until statements will be executed as long as condition is False.(i.e.,) The Loop should be repeated till the condition is True.
8.Loop Control Statements
Loop control statements change execution from its normal sequence. When execution leaves a scope, all the remaining statements in the loop are NOT executed.
VBScript supports the following control statements.
1) Exit For Statement,
2) Exit Do Statement
9.Exit For Statement
Terminates the For loop statement and transfers execution to the statement immediately following the loop
10.Exit Do Statement
Terminates the Do While statement and transfers execution to the statement immediately following the loop
11.Visit GoLearningBus.Com for more “www.vbsedit.com” training
Visit GoLearningBus.Com for more “www.vbsedit.com” guided tours and training.
For only $10 you can access more than 300 apps for a lifetime of learning and training.