Tracing

The process of executing code one line at a time, as we did in the previous example, is referred to as tracing or code stepping. Excel provides three options related to tracing: stepping into, stepping over, and stepping out of. The difference between these methods refers to handling calls to other procedures.

To illustrate the difference, consider the code shown in Example 4-2. In ProcedureA, the first line of code sets the value of cell A1 of the active worksheet. The second line calls ProcedureB and the third line boldfaces the contents of the cell. ProcedureB simply changes the size and name of the font used in cell Al. Don't worry about the exact syntax of this code. The important thing to notice is that the second line of ProcedureA calls ProcedureB.

0 0

Post a comment