Excel 2016 Macros

Lesson 3 – Editing Macros

Excel 2016

S TEP - BY -S TEP Edit macro commands manually.

If necessary, enable the macros. Make sure that your current folder is set for the path containing the student data files.

Steps

Practice Data

1. Select the Developer tab on the Ribbon . The Developer tab is displayed. 2. Select the Macros button in the Code group. The Macro dialog box opens. 3. Select the macro you want to edit from the Macro list. The desired macro is selected and is displayed in the macro name box . The Macro dialog box closes and the Visual Basic Editor opens with the insertion point placed in the selected macro. 5. Select the text you want to edit. The text is selected. 4. Select the Edit button.

Click Developer , if necessary

Click

Click Open_Cities

Click

Double-click the word NEWYORK in the Open_Cities macro

6. Edit the selected text.

Type TAMPA

The text is edited accordingly.

Practice the Concept: Double-click Module2 in the Project Explorer task pane to open the CITY57.XLSM - Module2 Code window. Scroll as necessary to view the Close_Cities macro. Double-click the word NEWYORK in the first Workbooks().Close command and replace it with the word TAMPA .

Close the Visual Basic Editor by selecting the File menu and then Close and Return to Microsoft Excel . Select the Macros button in the Code group on the Developer tab and run the Open_Cities macro. Notice that the macro now opens the TAMPA.XLSX workbook instead of

Page 50

OFFICEPRO, Inc.

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