Previously we posted steps to create, edit, run and debug an excel macro with Excel 2003. Some of our readers, however, are using Microsoft Excel 2007 and we thought we should enable our readers to run the vb code posted on Vertical Horizons. So here is quick walk through of how to work with an excel macro in Excel 2007.
First step is to create a Macro. For creating a macro, either use Alt + F8 or select ‘View’ from top menu bar, click on ‘Macros’ and select ‘View Macro’ as shown in the image below:
Clicking on ‘View Macro’ will launch the below window. Type the name of Macro and click on Create button.
Clicking on Create button will launch the Visual Basic editor as below.
Select worksheet and run the Macro by either using Alt + F8 or select ‘View’ from top menu bar, click on ‘Macros’ and select ‘View Macro’. Select the required Macro and click on “Run” button.
- Either use Alt + F8 or select ‘View’ from top menu bar, click on ‘Macros’ and select ‘View Macro’. Select the required Macro. Select the Macro “Compare” and click on “Edit” button.
- This will launch the Visual Basic Editor.
- Change the code as required.
- Save the Macro.
We hope that you like the post. Feel free to give your suggestions and inputs in the comments section below.