Please Note: This article is written for users of the following Microsoft Excel versions: 2007, 2010, and 2013. If you are using an earlier version (Excel 2003 or earlier), this tip may not work for you. For a version of this tip written specifically for earlier versions of Excel, click here: Assigning Macros to Graphics.
by Allen Wyatt
(last updated May 3, 2018)
You already know that Excel allows you to add graphics to your worksheets, such as pictures. You may not know, however, that you can assign macros to these graphics. With a macro associated with a graphic, the macro is executed whenever someone clicks on the graphic.
To assign a macro to a graphic, follow these steps:
Figure 1. The Assign Macro dialog box.
Save your workbook and test out your assignment by clicking on the graphic. The macro should run, as desired.
ExcelTips is your source for cost-effective Microsoft Excel training. This tip (9426) applies to Microsoft Excel 2007, 2010, and 2013. You can find a version of this tip for the older menu interface of Excel here: Assigning Macros to Graphics.
Comprehensive VBA Guide Visual Basic for Applications (VBA) is the language used for writing macros in all Office programs. This complete guide shows both professionals and novices how to master VBA in order to customize the entire Office suite for their needs. Check out Mastering VBA for Office 2010 today!
The WordArt program has been available in Office for a long, long time. It allows you to (as the name implies) create art ...Discover More
When you insert a shape into a worksheet, Excel does some preliminary formatting on that shape. You can subsequently make ...Discover More
A common way of representing data is to use a Venn diagram. Unfortunately, Excel doesn't have a precise way of creating ...Discover More
FREE SERVICE: Get tips like this every week in ExcelTips, a free productivity newsletter. Enter your address and click "Subscribe."
Got a version of Excel that uses the ribbon interface (Excel 2007 or later)? This site is for you! If you use an earlier version of Excel, visit our ExcelTips site focusing on the menu interface.