Module 0172: Built-in assistance in VBA

Tak Auyeung, Ph.D.

May 11, 2009
1 About this module
2 IDE
3 Syntax errors and the VBA environment
 3.1 What is a syntax error?
 3.2 The VB Editor
 3.3 Run-time syntax errors
 3.4 Forced compilation
4 Run-time errors
 4.1 What is a run-time error?
 4.2 What to do with a run-time error?
5 Logic errors
 5.1 What is a logic error?
 5.2 How to stop an infinite loop?
6 Break points
 6.1 What is a break point?
 6.2 Running a program with break points
 6.3 Run to cursor
7 Inspecting variables
 7.1 Inspecting simple variables
 7.2 Watching a general expression
 7.3 Using the Watches window
8 How to use the debugger features
 8.1 Infinite loops
 8.2 Program takes a wrong branch
 8.3 A variable gets the wrong value
9 Debugging a program structurally
 9.1 Shorter subroutines
 9.2 Think top-down, do bottom-up
 9.3 Get rid of global variables, as much as possible