Controlling Program Flow and Making Decisions

In This Chapter

^ Discovering methods for controlling the flow of your VBA routines ^ Finding out about the dreaded GoTo statement ^ Using If-Then and Select Case structures ^ Performing looping in your procedures

5ome VBA procedures start at the code's beginning and progress line by line to the end, never deviating from this top-to-bottom program flow. Macros that you record always work like this. In many cases, however, you need to control the flow of your code by skipping over some statements, executing some statements multiple times, and testing conditions to determine what the procedure does next. Ready or not, you find out how to do all that stuff in this chapter.

Was this article helpful?

0 0

Post a comment