A new chapter in practical learning ·Now enrolling: Excel + AI Mastery, Excel Essentials in 2 Hours, Excel Pivot Tables & Dashboards, Excel VBA Basics with AI, Financial Modeling in Excel, Google Sheets Complete Course and Power BIView the courses ↗
What VBA is: macros, the .xlsm file and macro security
Module 1: Macros and the Macro Recorder · 5 min
The business scenario
Every Monday Pine Valley's sales manager opens the weekly export (46 order lines for week 14, $48,022.29) and formats the same header by hand: bold, light blue fill. A macro does it in one click - and she can open the code to see exactly what it does.
What you will be able to do
Explain what a macro and VBA are, see where the code lives (Alt+F11), know why macro workbooks are saved as .xlsm, and decide safely when to click Enable Content.
In this video
A macro is a recorded or written list of steps
Run a macro with Alt+F8
Where the code lives: Alt+F11
.xlsm keeps macros, .xlsx throws them away
The yellow security bar
Macros cannot be undone
Common mistakes to avoid
Saving the workbook as .xlsx - the macro is gone. Save as .xlsm.
Clicking Enable Content on every file from email - only enable files you trust.
Pressing Ctrl+Z after a macro - macro steps cannot be undone. Test on a copy.
Practice files
Download Module-01-Macros-and-Recorder-Practice-Files.zip from the Practice resources tab; the finished workbooks and code are in Module-01-Macros-and-Recorder-Solutions.zip (open them only after your own attempt).