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

Writing a Macro from Scratch

Creating macros can help extend what you can do in Word. If you work with macros, you know that creating macros from ...

Discover More

Changing AutoFilter Drop-Down Arrow Colors

The drop-down arrow used at the top of columns by AutoFilter can be difficult to see. Here's a way you can reduce the ...

Discover More

Summing Only Cells Containing Formulas

If you want to figure out the sum of all cells that contain formulas, there are a couple of ways you can go about it. ...

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)

Quickly Removing a Toolbar Button

Want to get rid of a toolbar button? There's no need to drag open the menus and dialog boxes; just use the shortcut ...

Discover More

Customizing a Toolbar

Toolbars make it easy to quickly access your most common commands. Excel allows you to customize your toolbars so that ...

Discover More

Changing Toolbar Location

Toolbars don't need to be tethered to the top of your program window. Although they are right at home there, you may want ...

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 two less than 9?

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.