Other Ways to Run Macros

You have seen how to run macros with shortcuts and how to run them from the Ribbon and status bar macro buttons. Neither method is particularly friendly. You need to be very familiar with your macros to be comfortable with these techniques. You can make your macros much more accessible by attaching them to buttons.

If the macro is worksheet-specific, and will only be used in a particular part of the worksheet, then it is suitable to use a button that has been embedded in the worksheet at the appropriate location. If you want to be able to use a macro in any worksheet or workbook and in any location in a worksheet, it is appropriate to attach the macro to a button on the Quick Access Toolbar.

There are many other objects that you can attach macros to, including combo boxes, list boxes, scrollbars, checkboxes, and option buttons. These are all referred to as controls. (See Chapter 11 for more information on controls.) You can also attach macros to graphic objects in the worksheet, such as shapes created with the Shapes button on the Insert tab of the Ribbon.

0 0

Post a comment