vbs loop code example
Example 1: vbscript for each loop
For Each item In items
...
If exitNow = True Then
Exit For
End If
Next
Example 2: vbscript for loop
Dim i
For i = 1 To 5
document.write("The number is " & i & "<br />")
Next
' Output:
' The number is 1
' The number is 2
' The number is 3
' The number is 4
' The number is 5