In Microsoft Excel 2007, macros can be created using Microsoft Visual Basic. The following will show you how to create a macro using Microsoft Visual Basic:
1. If the Developer tab is unavailable, complete the following to display it: a. Click the Microsoft Office Button, and then click Excel Options. b. In the Popular category, under Top options for working with Excel, choose the Show Developer tab in the Ribbon check box, and then click OK.
2. To set the security level temporarily to enable all macros, complete the following instructions: a. On the Developer tab, in the Code group, click Macro Security.
b. Under Macro Settings, click Enable all macros (not recommended, potentially dangerous code can run), and then click OK.
Note: To help prevent dangerous code from running, it is recommend that you return to any of the settings that disable all macros after you are finished working with macros.
3. On the Developer tab, in the Code group, click Visual Basic.
4. If needed, on the Insert menu, click Module.
Note: Modules are automatically created for all sheets in the workbook.
5. In the code window of the module, type or copy the macro code that you want to use.
6. To run the macro from the module window, press F5.
7. On the File menu, click Close and Return to Microsoft Excel when you finish writing the macro.
Microsoft Excel 2007: Assign a macro to an object, graphic, or control | Add to Favorites |
There are many new features available in Microsoft Excel 2007. One of the neat things you can do in it is assign a macro to an object, graphic, or control. The following will show you how to do it.
1. On a worksheet, right-click the object, graphic, or control to which you want to assign an existing macro, and then click Assign Macro on the shortcut menu.
2. In the