VBA

Scripting inside Microsoft Office.

VBA is taught here in 3 lessons, running from The VBA editor and the language through to Error handling and the classic pitfalls. Each lesson takes one topic, shows the working code, and links onward to the next, so the course can be read straight through in order.

TrackProgramming Languages
Lessons3
LevelBeginner
Reading timeabout 39 minutes
PrerequisitesHelpful, but not required: Dart

Lessons

  1. The VBA editor and the languageFinding the VBE, what a macro-enabled file really is, and the declarations and types that keep a module honest.
  2. Macros, worksheets and rangesThe Office object model, reading whole blocks into arrays instead of cell by cell, and where event handlers must live.
  3. Error handling and the classic pitfallsOn Error in place of try/catch, a cleanup pattern that always restores state, and the mistakes that bite every VBA author.

More in Programming Languages

C C++ C# Scala Lua Dart

FAQ

How long does the VBA course take?
It has 3 lessons, about 39 minutes of reading. Expect roughly twice that if you type out and run every example.
Do I need prior experience for VBA?
Not strictly. It helps to have read Dart first, because some lessons build on it, but every lesson explains its own assumptions.
What should I read after VBA?
This is the last course in Programming Languages right now. Browse the other tracks from the courses index to go sideways.

Last refreshed 2026-09-18.