Главная » Excel Macros For Dummies читать онлайн | страница 20

Читать книгу Excel Macros For Dummies онлайн

20 страница из 60

To start recording your first macro, you need to first find the Macro Recorder, which is on the Developer tab. Unfortunately, Excel comes out of the box with the Developer tab hidden — you may not see it on your version of Excel at first. If you plan to work with VBA macros, you'll want to make sure that the Developer tab is visible. To display this tab

1 Choose File ⇒ Options.

2 In the Excel Options dialog box, click Customize Ribbon.

3 In the list box on the right, place a check mark next to Developer.

4 Click OK to return to Excel.

Now that you have the Developer tab showing in the Excel Ribbon, you can start up the Macro Recorder by selecting Record Macro from the Developer tab. This activates the Record Macro dialog box, as shown in Figure 1-1.


ssss1 The Record Macro dialog box.

Here are the four parts of the Record Macro dialog box:

 Macro Name: Excel gives a default name to your macro, such as Macro1, but you should give your macro a name more descriptive of what it actually does. For example, you might name a macro that formats a generic table as FormatTable. You have to follow a few rules when naming a macro. The first character must be a letter. Generally, special characters other than underscore aren't allowed. And the total number of characters can't be more than 255, although hopefully you don't get close to that limit.