Microsoft Office Tutorials and References
In Depth Information
Assigning a macro to an object
1. Select View
Toolbars
Customize to display the Customize dialog box.
2. Select the Toolbars tab in the Customize dialog box, and make sure that
the toolbar that is to contain the new button is visible. Or, click New to
create a new toolbar.
3. Select the Commands tab in the Customize dialog box.
4. Choose the Macros category.
5. In the Commands list, drag the Custom Button icon to the toolbar.
6. Right-click the toolbar button and select Assign Macro from the shortcut
menu. Excel displays its Assign Macro dialog box.
7. Select the macro name from the list and click OK.
8. At this point, you can right-click the button again to change its name and
button image.
9. Click Close to exit the Customize dialog box.
Assigning a macro to an object
Many objects that are inserted on a worksheet can have a macro associated with
them. For example, you may want to add a Button object from the Forms toolbar,
and use the button to execute a macro. Or, you can assign a macro to AutoShape or
even a ChartObject.
After adding the control or AutoShape, right-click the object and select Assign
Macro to display the Assign Macro dialog box. Select the macro from the list and
click OK.
When you add a Button object from the Forms toolbar, the Assign Macro
dialog box appears automatically.
Search JabSto ::




Custom Search