6. Using Flow-of-Control Statements
Branching and Looping
So far, nearly all the code that you’ve seen in this book has been strictly sequential. That is, execution starts at the top of each procedure, continues line-by-line through the procedure, and stops at the end of the procedure. The one exception to this rule that you’ve seen so far has been in error-handling code.
VBA is capable of more complex patterns of program execution than this, though. To write flexible VBA code, you need to understand the concepts of branching and looping. Branching ...