Introduction to macros and VBA
When launched in 1993 (yes, 1993), VBA was revolutionary. Earlier versions of Excel and other spreadsheets had Macros, which offered little more than a replay of user keystrokes. VBA provided the ability to record user actions as a programming language (similar to the popular Basic language of the day) and then allowed users to modify that in the code editor. It gave an easy path for Excel power users (like you!) to learn to solve problems while leaving the door open to upgrade to more scalable enterprise solutions.
These days, VBA is not switched on by default in Excel, so you’ll need to enable it so you can see what it looks like. We’ll start by enabling the Developer tab on the Excel ribbon:
- In the Excel Options menu, select the File options, then Customize Ribbon. You’ll see a dialog similar to Figure AA.1:
Figure AA.1 – Enabling the Developer ribbon in Excel
- Within this...