1

^ Each action that you perform in the Excel user interface may equate to one or more lines of recorded code. Some actions might generate a dozen lines of code.

It is always a good idea to test out your macro. Return to the regular Excel interface, using Alt+F11. Close Invoice.txt without saving any changes. You still have MacroToImportInvoices.xls open.

Press Ctrl+i to run the recorded macro. It works beautifully! The data is imported, totals are added, bold formatting is applied, and the columns are made wider. This seems like a perfect solution (see Figure 1.12).

Figure 1.12

The macro formats the data in the sheet beautifully.

Figure 1.12

The macro formats the data in the sheet beautifully.

0 0

Post a comment