Browse » Home
Tuesday, June 12, 2012
How to Edit Macros in Excel
1. Open an existing spreadsheet or workbook in Excel that has at least one macro already created. Go to the 'Tools' menu bar and select 'Macro' and then 'Macros.'
2. Type the name of the macro you wish to edit into the 'Macro Name' box. Click on the desired macro if multiple appear.
3. Click the 'Edit' button. The Visual Basic editor will be displayed in a separate window with the code for that macro displayed.
4. Make the desired changes to the macro. Leave the first line starting with 'Sub' and the last line should remain 'End Sub.'
5. Close the box with the edited information. The changes are saved automatically. Test the macro changes by going back to the spreadsheet you wish to use it on, and highlighting the cells it is to be used on.
6. Select 'Tools', then 'Macro' and 'Macros.' Choose the macro you just edited and click the 'Run' button. Save the spreadsheet again to save the changes to the macro.