4. Using Procedures

Understanding Procedure Types

VBA code is organized into statements. A statement is a single line of code, for example:

intCount = 6

This statement sets the value of the intCount variable to 6. Although you can execute individual statements in the Immediate window, you can’t store individual statements in a VBA module. Within a module, statements must be organized into procedures: groups of statements that perform a task together. Although you’ve already seen a few procedures in the brief bits of code demonstrated in earlier chapters, this chapter ...

Get Business solutions Automating Microsoft now with O’Reilly online learning.

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