Tag «for loop»

For . . . Each . . Next loop in VBScript

There will be some situations where we do not know the number of iterations, but we need to execute a block of code for all the elements in an array (its a data type) or for all the objects.  Here, array and object concepts are new but having look at the following script makes it …

For Loop in VBScripting

In vbscript to execute set of statements FOR LOOP can be utilized.  There are two variants of this are present.  Let us start with the first one. 1. For . . . Next Syntax: For {integer variable}={initial value} to {Max value for the variable} Step {incremental value e.g. –2, 1, 2, etc} . . . …

Looping Statements in VBScript

Let us have a look at the following vbscript: msgbox "Hello world" msgbox "Hello world" msgbox "Hello world" msgbox "Hello world" msgbox "Hello world" msgbox "Hello world" msgbox "Hello world" msgbox "Hello world" This is simply printing one message eight times.  This looks pretty simple!!! But, if we need to repeat 50 of such statements …