Saving Macros

The WhatsInACell macro you created in this chapter is located in a Microsoft Excel workbook. To save the macro on a disk, you need to save the open workbook. I suggest that you save your macro now in a workbook file named Chap01.xls. After you save the workbook, close it and then open a brand new workbook. Notice that your custom toolbar button is still available, as is the Contents of Cells option on the Tools menu. Before you try to run your macro using any of these tools, enter the text "Addition" in cell A1, the number 2 in cell A2, the number 4 in cell A3, and =Sum(A2:A3) in cell A4. When you run the macro, Excel opens the appropriate workbook file and executes the procedure assigned to your custom tool.

0 0

Post a comment