Tag Archives: For Loops

Loops – For Each

In this blog post we will be explaining the For…Each loop and providing some examples of its usage. Demonstrating The For Each Loop with An Array We can use the For Each loop over a standard array. Sub forEachArray()          Dim element As Variant     Dim animals(0 To 5) As String     ‘We […]

Loops – For Next

In this blog post we will introduce the For…Next Loop and provide some examples of its usage. The standard syntax of a For…Next loop is: For counter = start To end … next i In the code above counter is a variable that keeps track of the number of loops performed. start is the starting […]