Microsoft Office Tutorials and References
In Depth Information
Weapons of Mass Debugging
figurE 17-10
Using the Step Over Command
The Step Over command is similar to the Step Into command, with the difference between the two
commands occurring at the point of a call to another macro. You may have noticed in the macro the
code line Call myChartMaker , where in this hypothetical example the myChartMaker macro creates
a chart sheet from the table data. Figure 17-11 shows that Call statement highlighted during the
Step Into process.
In this situation, if you click the Step Over button, the Call myChartMaker command will be
executed but you will not be taken through it line by line as if it were stepped into. You would prefer
to do this when you know for sure that the myChartMaker macro works without any problems, and
cannot be the cause of whatever bug you are trying to fix in the current macro. The Step Over
command will execute the myChartMaker macro and the next line of code in your macro will be
highlighted for the next Step Into command.
Did you notice a tiny arrow in the margin to the left of the macro being stepped
into? When a line of code is highlighted during a stepping process, a yellow
arrow in the Code window’s left margin helps to indicate your place in the
process. With your mouse, you can select and drag the arrow upward or downward,
dropping it at whichever line of code you want to execute next.
Search JabSto ::

Custom Search