Looping Through Code
Last modified: December 06, 2011
Applies to: Office 2013 | VBA
Using conditional statements and looping statements (also called control structures), you can write Visual Basic code that makes decisions and repeats actions. Another useful control structure, the With statement, lets you to run a series of statements without having to requalify an object.
Looping allows you to run a group of statements repeatedly. Some loops repeat statements until a condition is False; others repeat statements until a condition is True. There are also loops that repeat statements a specific number of times or for each object in a collection.