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: Seeing All Open Workbook Names.

Seeing All Open Workbook Names

by Allen Wyatt
(last updated January 3, 2015)

3

Excel allows you to open quite a few workbooks at the same time, depending on the amount of memory you have available on your system. For some people it is not unusual to have ten, fifteen, twenty, or more workbooks open, all at once.

Traditionally, the normal method used to switch from one workbook to another is to display the View tab of the ribbon and use the Switch Windows tool to select the desired workbook. If there are more than nine workbooks open and you click the Switch Windows tool, Excel displays an option that says "More Windows." Click the option and you can see a display of all open workbooks. Selecting a workbook from this list ends up in that workbook being displayed.

If you routinely work with many open workbooks, it can be a pain to repeatedly click the Switch Windows tool, click More Windows, and then select which workbook you want to view. It would be much easier if the workbooks were all listed and if you could then select from the list. Unfortunately, Excel doesn't allow you to display more than nine workbooks using the Switch Windows tool. (Nine seems to be a rather arbitrary number, but Microsoft had to set a limit somewhere. Nine is just as good as any other arbitrary limit.) There are, however, some workarounds you can use.

The first workaround is to use the task-switching capabilities of Excel. Just hold down the Alt key as you repeatedly press the Tab key to switch from one window to another. When the desired workbook window is selected, release the Alt key and the actual workbook is displayed.

You can also develop macros to display a list of workbooks, allow you to select one, and then switch among them. The most efficient way to do this is to create a UserForm and attach several macros to it. Follow these steps:

  1. Make sure you have created a Personal workbook to contain your common macros. (How this is done has been discussed in other issues of ExcelTips.)
  2. Press Alt+F11 to display the VBA Editor.
  3. Make sure the Personal workbook is selected in the Project window. (Upper-left corner of the VBA Editor.)
  4. Choose UserForm from the Insert menu. A new UserForm appears in the center of your screen.
  5. Using the toolbox at the left side of the VBA Editor, place a ListBox control on the UserForm. This control will hold the list of open workbooks. (Feel free to make the ListBox as large or small as desired.)
  6. Add any other items desired to the UserForm, such as explanation text, etc.
  7. Resize the UserForm to the size you want displayed.
  8. Right-click on the UserForm (not on the ListBox) and select View Code from the Context menu. You then see the Code window for the UserForm.
  9. Replace whatever is in the Code window with the following code:
  10. Private Sub ListBox1_Click()
        Windows(ListBox1.Value).Activate
        Unload Me
    End Sub
    
    Private Sub UserForm_Activate()
        Dim wkb As Workbook
    
        For Each wkb In Workbooks
            If Windows(wkb.Name).Visible Then _
              ListBox1.AddItem wkb.Name
        Next
    End Sub
    
  11. Choose Module from the Insert menu. A Code window appears for the new module.
  12. Add the following code to the module's Code window:
  13. Sub AllWindows()
        UserForm1.Show
    End Sub
    
  14. Close the VBA Editor and return to Excel by pressing Alt+Q.

Once in Excel, you can assign the AllWindows macro to the Quick Access Toolbar or to a shortcut key. When you then click on the toolbar button or the shortcut key, the UserForm is displayed, showing all the open workbooks. You can then select one, and the UserForm disappears and the selected workbook is displayed.

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 (8449) applies to Microsoft Excel 2007, 2010, and 2013. You can find a version of this tip for the older menu interface of Excel here: Seeing All Open Workbook Names.

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

Swapping Two Cells

If you need to swap the contents of two cells in your worksheet, Excel provides a number of ways you can approach the ...

Discover More

Looking Backward through a Data Table

Sometimes you need to look backward, through the information above your formula, to find the data you need. This can be ...

Discover More

Permanently Removing Blue Squiggly Underlines

Word's grammar checker can helpfully mark grammar goof-ups as you type. When you pass your document on to another person, ...

Discover More

Professional Development Guidance! Four world-class developers offer start-to-finish guidance for building powerful, robust, and secure applications with Excel. The authors show how to consistently make the right design decisions and make the most of Excel's powerful features. Check out Professional Excel Development today!

More ExcelTips (ribbon)

Printing Workbook Properties

Want to create a printed record of the properties associated with a workbook? There is no easy way to do it in Excel. ...

Discover More

Opening Multiple Workbooks at Once

Need to open a bunch of workbooks from within Excel? It's easy to do when you construct a selection set in the Open ...

Discover More

Creating Default Formatting for Workbooks and Worksheets

Not satisfied with the way that default workbooks and worksheets look in Excel? You can easily create your own defaults ...

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}] 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 seven less than 9?

2015-01-19 13:17:28

Dennis Costello

I always just use the Task Bar - hovering over the Excel icon shows a list of all the open workbooks, and you can click on the one you want to switch to. There is no limit to the number that Windows will display in that manner - if there are enough to fill the height of the screen, you can scroll inside that list.

That seems to me to be a lot easier than the Switch Windows tool, even when you have 9 or fewer workbooks open.


2015-01-07 19:42:05

jcaister

I notice that the Sub UserForm_Activate() will fail with an Subscript out of range error (Error 9) if more than one window of the same workbook is open. I suggest changing this Sub to:
Dim wnWindow As Window

For Each wnWindow In Windows
If wnWindow.Visible Then _
ListBox1.AddItem wnWindow.Caption
Next


2015-01-07 19:15:42

jcaister

Great tip!


This Site

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.

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.