When you are writing VBA and building Excel applications, you may spend a lot of time
stepping through code. What does that mean?
Normally, code is triggered by some event (like a button being
clicked), then the processing dictated by the code runs and completes.
The user never sees the code, only the results of it running.
In break mode, the code can be “stepped through” in various
ways. This allows you, as the programmer, to control the step-by-step running of the code. You can cause the processing to execute a single code line at at time or cause processing to stop at key locations in the program. This allows you to
scrutinize code performance as the code is running. It is like watching a film frame by frame or in slow motion, with the capability of stopping the film at any frame. This is an important feature of the VB Editor and a great help for debugging programs.
FLASH EXERCISE:
- Go back to the
VB Editor to the session where you wrote the sheet activation code; it should look something like the picture below.
- Start the Flash Exercise below and follow the directions. You will step through the code you wrote in the earlier lesson.
Stepping through code