Buttons for Workbooks

Written by Allen Wyatt (last updated October 28, 2023)
This tip applies to Excel 97, 2000, 2002, and 2003


Tony is looking for a way to put buttons on the toolbar that will open regularly used Excel workbooks, without the use of a macro.

Most people use custom toolbar buttons to initiate macros, including macros that open new workbooks. Here, for instance, is a simple macro that could be used to get the desired results:

Public Sub OpenMyWorkbook() 
    Workbooks.Open _
      Filename:="D:\Data\MyWorkbook.xls", _
      UpdateLinks:=False
End Sub 

All you need to do is change the name of the macro and the name of the file you want to open, and you've got a great way to open specific workbooks. If you don't want to use the macro (and many people, such as Tony, prefer not to), then you can follow these steps:

  1. Choose Customize from the Tools menu. Excel displays the Customize dialog box.
  2. Make sure the Commands tab is selected. (See Figure 1.)
  3. Figure 1. The Commands tab of the Customize dialog box.

  4. In the list of Categories, select the Macros category.
  5. In the list of Commands, select the Custom Button command.
  6. Use the mouse to drag the Custom Button command from the Commands list to its new location on the toolbar. When you release the mouse button, the icon (a smiley face) appears on the toolbar.
  7. Right-click the smiley face icon on the toolbar (the icon you just placed). Excel displays a Context menu.
  8. In the Name field type a new name for this tool—perhaps the name of the workbook you will open with the button. Just type the name, without pressing Enter.
  9. On the Context menu choose Assign Hyperlink | Open. Excel displays the Assign Hyperlink dialog box, which looks like a standard Open dialog box.
  10. Use the controls in the dialog box to locate and select the workbook you wanted the button to open.
  11. Click OK to accept the workbook you selected.
  12. Click on Close to dismiss the Customize dialog box.

ExcelTips is your source for cost-effective Microsoft Excel training. This tip (2884) 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

Converting Numbers to Strings

VBA is great at working with both strings and numbers. At some point you may have a number you need to convert to a ...

Discover More

Selecting Printing of Color Pictures

Do you want to control whether color pictures in your document are printed or not? It's not quite as easy as it may ...

Discover More

Trouble Recording Paste Special Formula

Sometimes, when you upgrade to a new version of Excel, you could run into a problem recording macros that you had no ...

Discover More

Create Custom Apps with VBA! Discover how to extend the capabilities of Office 2013 (Word, Excel, PowerPoint, Outlook, and Access) with VBA programming, using it for writing macros, automating Office applications, and creating custom applications. Check out Mastering VBA for Office 2013 today!

More ExcelTips (menu)

Resetting Toolbars to Their Default

Once you've edited your toolbars, you may want to change them back to their default appearance and behavior. This tip ...

Discover More

Creating a New Toolbar

Excel's interface can be easily modified to reflect the way you want to do your work. This tip explains how you can ...

Discover More

Editing a Toolbar Button Image

Don't like the toolbar button images in your version of Excel? Don't fret; you can pull up the button editor and make ...

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 five less than 6?

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.