Assign a Macro to a Graphic Object
You can assign macros to the graphic objects that you’ve inserted in your worksheet, including Pictures, Shapes, Icons that you can insert using Insert
> Illustrations
. You can also assign macros to graphic objects that you have drawn using tools on the Draw
tab.
To assign a macro to a graphic object, do the following:
- Insert the graphic object in the worksheet area, for the example, an icon from Insert
tab > Illustrations
> Icons
.
- Right-click the object and then click the Assign Macro
option from its shortcut menu.
- In the Assign Macro
dialog box, select the macro name from the Macro name
list box and click OK
.
After you’ve assigned the macro to the graphic object, whenever you mouseover it, the mouse pointer changes to a hand with a pointing index finger, indicating that you can click it to run the macro.