Stepping Through Code

Generally, a macro runs really fast. You start, and less than a second later, it is done. If something goes wrong, you have no opportunity to figure out what it is doing. Using Excel's Step Into feature, it is possible to run one line of code at a time.

Make sure the cursor is in the Importlnvoice procedure and from the menu select Debug, Step Into (or press F8) (see Figure 2.17).

Figure 2.17

Stepping into code allows you to run a single line at a time.

Debug 1 Run Tools Add-Irtî V^ndow

0 0

Post a comment