Excel 2016 Macros

Lesson 2 - Recording Macros

Excel 2016

Steps

Practice Data

9. When you have finished recording macro steps, click the Stop Recording button in the Code group. The macro recorder stops. The Record Macro button displays again and the macro recording is complete.

Click

Display the Home tab and format the current cell with bold and italics using the appropriate buttons in the Font group. Also, change the font size to 14 . Then, type Worldwide Sporting Goods into the current cell and press [Enter] . Redisplay the Developer tab.

Return to the table and continue to step 9.

Select cell A14 and display the Home tab. Click the Clear button in the Editing group and then select Clear All to remove the format and contents of cell A14.

Select cell A1. Redisplay the Developer tab and click the Macros button in the Code group. Select the Company macro in the Macro dialog box and click Run . Notice that the label is entered in cell A1 because the macro was recorded to run relative to the currently selected cell in the worksheet

Click the Visual Basic button in the Code group to open the Visual Basic editor. Double-click the last recorded module in the Project - VBAProject task pane to view the Company macro. Select File on the menu bar and then click Close and Return to Microsoft Excel . Click the Use Relative References button in the Code group on the Developer tab to deselect it.

D ELETING A M ACRO  D ISCUSSION

If you no longer use a macro, you can delete it. Since macros can invoke other macros, you should make sure that the macro you are deleting is not needed by any other macro.

If a macro is stored in a workbook, the workbook must be open to delete the macro. If the macro is stored in the Personal Macro Workbook , which automatically loads as a hidden window every time you open Excel, the Personal Macro Workbook window must be unhidden before the macro can be deleted.

OFFICEPRO, Inc.

Page 37

Made with FlippingBook - professional solution for displaying marketing and sales documents online