O'Reilly logo

Absolute Beginner's Guide to VBA by Paul McFedries

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

6. Controlling Your VBA Code

In This Chapter

• Creating “smart” procedures that make decisions

• Handling everything from simple True/False decisions to complex multiple-decision logic

• Learning about the handy VBA functions that make decisions

• Eliminating repetitive coding by making good use of programming loops

One of the advantages of writing your own VBA procedures instead of simply recording them is that you end up with much more control over what your code does and how it performs its tasks. In particular, you can create procedures that make decisions based on certain conditions and that can perform loops—the running of several statements repeatedly. The statements that handle this kind of processing—control structures—are the subject ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required