Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.
Now that you've learned how macros are organized, it's time to dive in and tackle the actual macro code. In the following sections, you'll take your first look at VBA code and learn how Excel uses a special programming tool called objects. (Objects are programming tools that you use to trigger Excel features. You'll learn more about them on Objects 101.)
A good place to start learning about the guts of a macro is the FormatRow macro shown in the previous chapter, which automatically highlights a row with a light green background, and then moves down two rows.
Following is the complete VBA code for the FormatRow macro. To make it easier to analyze, each line of code has been numbered, and the code has been simplified a little from what Excel generated automatically: