Adding AutoShapes

Written by Allen Wyatt (last updated June 11, 2022)
This tip applies to Excel 97, 2000, 2002, and 2003


The graphics features of Excel allow you to add a number of predefined shapes to a workbook. These shapes, called AutoShapes, cover a wide range of needs. If you want to add shapes to the AutoShapes feature, however, you are out of luck. The shapes are apparently hard-coded into Excel, and cannot be modified.

You can, however, add shapes to the Clip Gallery. If you format the shapes as WMF files, they are easy to add and easy to place within a worksheet. For instance, if you have a number of different flowchart symbols that you want to make available in Excel, all you need to do is save each symbol in the WMF format, and then import them into the Clip Gallery. (To save graphics in the WMF format, you will need to use a specialized graphics program, such as Paint Shop Pro or Corel Draw.)

If you don't want to use the Clip Gallery for some reason, you can simulate your own AutoShapes through a combination of macros and graphics in a hidden worksheet. The following general steps detail how to do this for a series of twenty flowchart symbols. The steps assume that you are reasonably comfortable writing macros and customizing toolbars.

  1. Open a template workbook, and make sure it has only a single worksheet.
  2. Place all the flowchart graphics on the worksheet.
  3. Create a new toolbar, name it MyShapes, and make sure it is associated with the template workbook.
  4. Add twenty buttons to the toolbar, one for each flowchart graphic. The idea is that clicking a button will add the associated flowchart shape to the active worksheet.
  5. Edit each button face to show as closely as possible each flowchart graphic. (This is the toughest part of these steps).
  6. Change the ToolTip text for each button, as desired. This is helpful so the user can understand the purpose of each flowchart graphic.
  7. In turn, select and name each of the flowchart graphics. (You name the graphics by selecting them and entering a name in the Name box at the left of the Formula bar.) For the purposes of these steps, assume you use names such as FlowObj1, FlowObj2, etc.
  8. Write twenty macros (one for each flowchart graphic) of the following kind:
Sub AddFlowObj1()
    ThisWorkbook.Sheets(1).Shapes("FlowObj1").Copy
    ActiveSheet.Paste
End Sub
  1. Assign each of the macros to the corresponding toolbar button.
  2. In the Workbook module of the template, add the following procedures:
Private Sub Workbook_Open()
    Application.CommandBars("MyShapes").Visible = True
End Sub
Private Sub Workbook_BeforeClose(Cancel As Boolean)
    Application.CommandBars("MyShapes").Delete
End Sub
  1. Save the template as an Excel add-in.
  2. Restart Excel and use Tools | Add-ins to active your new add-in.

Note:

If you would like to know how to use the macros described on this page (or on any other page on the ExcelTips sites), I've prepared a special page that includes helpful information. Click here to open that special page in a new browser tab.

ExcelTips is your source for cost-effective Microsoft Excel training. This tip (1995) applies to Microsoft Excel 97, 2000, 2002, and 2003.

Author Bio

Allen Wyatt

With more than 50 non-fiction books and numerous magazine articles to his credit, Allen Wyatt is an internationally recognized author. He is president of Sharon Parq Associates, a computer and publishing services company. ...

MORE FROM ALLEN

Hiding Gridlines

For those times when you remove the borders from your tables, Word provides a way that you can display non-printing ...

Discover More

Using WordArt in Excel

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

Wrapping Text around a Graphic in a Text Box

Word allows you to wrap text around a graphic or around a text box, but it won't allow you to wrap text in a text box ...

Discover More

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!

More ExcelTips (menu)

Setting a Transparent Color for an Image

Want to "see through" an image you place on a worksheet? You can do so by using the steps in this tip.

Discover More

Positioning Graphics Evenly

If you need to arrange a group of graphics so that they are evenly distributed between a starting point and an ending ...

Discover More

Quickly Duplicating Drawing Objects

Excel provides a couple of different ways that you can quickly duplicate drawing objects in a worksheet. Committing these ...

Discover More
Subscribe

FREE SERVICE: Get tips like this every week in ExcelTips, a free productivity newsletter. Enter your address and click "Subscribe."

View most recent newsletter.

Comments

If you would like to add an image to your comment (not an avatar, but an image to help in making the point of your comment), include the characters [{fig}] (all 7 characters, in the sequence shown) in your comment text. You’ll be prompted to upload your image when you submit the comment. Maximum image size is 6Mpixels. Images larger than 600px wide or 1000px tall will be reduced. Up to three images may be included in a comment. All images are subject to review. Commenting privileges may be curtailed if inappropriate images are posted.

What is 6 - 0?

There are currently no comments for this tip. (Be the first to leave your comment—just use the simple form above!)


This Site

Got a version of Excel that uses the menu interface (Excel 97, Excel 2000, Excel 2002, or Excel 2003)? This site is for you! If you use a later version of Excel, visit our ExcelTips site focusing on the ribbon interface.

Newest Tips
Subscribe

FREE SERVICE: Get tips like this every week in ExcelTips, a free productivity newsletter. Enter your address and click "Subscribe."

(Your e-mail address is not shared with anyone, ever.)

View the most recent newsletter.