Creating a Toolbar Button for Your Macro

Excel's toolbars give you quick access to the most commonly used commands. Instead of having to flip through a series of menus and submenus, you simply click a button in one of the toolbars or select the desired option from one of the drop-down lists. These toolbars can give you quick access to your macros as well. To add a macro to one of Excel's toolbars , follow these steps:

Tip

graphics/tman.gif

To learn how to create your own toolbars, flip back to the section named "Creating Your Own Toolbars" in Chapter 12, "Customizing Excel."


  1. Make sure the toolbar on which you want to place your macro button is displayed. (Select View , Toolbars to display a list of available toolbars.)

  2. Open the Tools menu and choose Customize .

  3. Click the Commands tab.

  4. In the Categories list, click Macros , as shown in Figure 13.5.

    Figure 13.5. You can add macro buttons to any toolbar.

    graphics/13fig05.jpg

  5. Drag the Custom Button from the Commands list over the toolbar on which you want it to appear, drag it to the desired location (watch for a dark I-beam pointer that shows where the button will appear), and release the mouse button. (See Figure 13.5.) The button appears on the toolbar. (Leave the Customize dialog box open to perform the next steps.)

  6. To change the name of the button, right-click it, drag over the entry in the Name text box, and type a new name for the button.

  7. To add an image to the button, right-click the button, point to Change Button Image , and click the desired image, as shown in Figure 13.6. If you want to display the image only, not the button name, right-click the button and select Default Style .

    Figure 13.6. You can pick a different image for your macro button.

    graphics/13fig06.jpg

  8. Right-click the button and choose Assign Macro . The Assign Macro dialog box appears, as shown in Figure 13.7.

    Figure 13.7. Assign the desired macro to the button you created.

    graphics/13fig07.jpg

  9. Click the name of the desired macro and click OK .

  10. When you are finished, click the Custom dialog box's Close button to close the dialog box.



Absolute Beginner's Guide to Microsoft Office Excel 2003
Absolute Beginners Guide to Microsoft Office Excel 2003
ISBN: 0789729415
EAN: 2147483647
Year: 2002
Pages: 189

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net