Working with Breakpoints

When a VBA application is executing inside the VBA editor, you can temporarily pause program execution. When a program is suspended, it is said to be in break mode. The usual way to enter break mode is to set a breakpoint, which specifies that the program should enter break mode either when a specified line of code is reached, or when a certain condition is met. While a program is in break mode, the next statement to be executed is highlighted in the editor window (if possible—the next statement may not be known), and you can carry out various actions to help track down the cause of a bug. Then, you can continue execution normally or terminate the program.

While you are in break mode, you can rest the mouse pointer over ...

Get Office® XP Development with VBA now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.