Please Note: This article is written for users of the following Microsoft Excel versions: 97, 2000, 2002, and 2003. If you are using a later version (Excel 2007 or later), this tip may not work for you. For a version of this tip written specifically for later versions of Excel, click here: Default Worksheet when Opening.

Default Worksheet when Opening

by Allen Wyatt
(last updated April 29, 2017)

5

When you open a workbook, Excel normally displays the worksheet last displayed when the workbook was last saved. You may want a specific worksheet to always be displayed when the workbook is opened, regardless of the worksheet displayed when the workbook was last saved.

You can control which worksheet is displayed by using this macro:

Private Sub Workbook_Open()
    Worksheets("StartSheet").Activate
End Sub

This macro will always display a worksheet named StartSheet. You will obviously need to change the worksheet name to something different; it should exactly match the name of the desired worksheet.

For this macro to work properly, it has to be associated with the workbook object. Follow these steps:

  1. Make sure you have only a single Excel workbook open. While this isn't exactly mandatory, it will make creating the macro a bit easier.
  2. Press Alt+F11 to display the VBA Editor.
  3. In the Project Explorer window you will see a list of the open workbooks and templates. If the Project Explorer is not visible on your screen, choose Project Explorer from the View menu.
  4. Locate your current workbook in the Project Explorer. It will be named something like VBAProject (MyWorkbook), where "MyWorkbook" is the name of the actual workbook.
  5. If there is a plus sign to the left of the current workbook in the Project Explorer, click on it. You should see a list of worksheets appear underneath the workbook.
  6. If you don't see a list of worksheets, but instead see a list of folders with plus signs to their left, click on the plus sign to the left of Microsoft Excel Objects. Now you should see the worksheets.
  7. At the bottom of the list of worksheets is the ThisWorkbook object. Double-click on it. A code window is opened.
  8. In the code window, paste or create the macro shown above. Make sure you name it exactly as shown.
  9. Close the VBA Editor.
  10. Save your workbook.

Now, whenever you open the workbook, the specified worksheet will be displayed.

ExcelTips is your source for cost-effective Microsoft Excel training. This tip (2014) applies to Microsoft Excel 97, 2000, 2002, and 2003. You can find a version of this tip for the ribbon interface of Excel (Excel 2007 and later) here: Default Worksheet when Opening.

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

Printing a Discussion

There are times you may have to work offline. Here is how to print out your discussion.

Discover More

Finding Formatted Bulleted Paragraphs

Want to find the bulleted paragraphs within a large document? Word doesn't have a built-in way to search for this ...

Discover More

Automatically Adjusting Height for Text Boxes

Text boxes are often used to enhance the layout of documents. You may want a text box that adjusts its height ...

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)

Easily Deploying Customizations

When you create a whole set of customizations for Excel, you may want to share them with others in your office or ...

Discover More

Changing Gridline Color

Gridlines are very helpful in seeing where cells are located on the screen. You are not limited to black gridlines; ...

Discover More

Creating Superscript and Subscript Buttons

Want a quick way to apply superscript and subscript to selected text within a cell? This tip shows how the formatting can ...

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 more than 2?

2018-02-01 11:08:26

Willy Vanhaelen

@Mark
Perhaps you use
Private Sub Workbook_Activate()
istead of
Private Sub Workbook_Open()


2018-01-31 08:46:20

Mark Arnold

Allen

Thank You for all you do. This is something I use all the time but just came across an anomoly. I have the macro so that my file opens on the page that I want , but if I go temporarily to use a different excel spreadsheet and then return to the one with the code it goes back to the initial opening window rather than stay on the page I was on, even though the worksheet was already open. is there any way I can stop this from happening.

Thanks


2017-12-20 14:37:37

Megan Smith

Doesn't seem to work for 2013?


2017-09-09 08:24:36

Frank Natalia

Most helpful. I would add that after adding Macro you have to save your Workbook in a Macro-Enabled format. (Save as)


2017-08-19 12:21:46

Robert Matthews

Worked great - thanks! Might be worth saying at point 8

"In the code window, paste or create the macro shown above. Make sure you use exactly the format shown - including the quote marks - around the sheet name you want to open with".


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.