Quick start – VBA programming

Now that you have the basic understanding about VBA (recording a macro, adding modules, browsing objects, and declaring variables), it is time to get to work.

In this section you will learn how to:

  • Use loops
  • Dimension and instantiate objects
  • Create sub routines and user-defined functions

Working with loops

You will start your programming trip down the VBA lane by learning a bit about loops. Loops allow you to repeat a set of instuctions until a predetermined condition changes or a criterion is met.

Loops are extremely important, so you should study and practice this section carefully. You will now be introduced to different looping methods. We will start with For-Next loops.

Method 1 – For-Next loops

If you need to count something ...

Get Excel Programming with VBA Starter now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.