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: Default Worksheet when Opening.

Default Worksheet when Opening

by Allen Wyatt
(last updated July 4, 2015)

9

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 (11146) applies to Microsoft Excel 2007, 2010, and 2013. You can find a version of this tip for the older menu interface of Excel 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

Overcoming Automatic Word Selection

When you select text with the mouse, Word usually selects entire words for you. If you don't want to do this, you can use the ...

Discover More

Selecting Tabs in Dialog Boxes

A Windows tip to assist with Excel tab access.

Discover More

ExcelTips: The Macros (Table of Contents)

Macros provide a way for you to extend the capabilities of Excel. The key to macros is understanding how VBA works. Here is ...

Discover More

Save Time and Supercharge Excel! Automate virtually any routine task and save yourself hours, days, maybe even weeks. Then, learn how to make Excel do things you thought were simply impossible! Mastering advanced Excel macros has never been easier. Check out Excel 2010 VBA and Macros today!

More ExcelTips (ribbon)

Disabled Macros

Do your macros seem to be disabled on your new machine? It could be because of the security settings in Excel. Here's where ...

Discover More

Worksheet Events

You can create macros that are automatically executed whenever certain events occur within a worksheet. This tip details what ...

Discover More

Finding Workbooks Containing Macros

Workbooks can contain macros, or not. It is entirely up to you whether they do or not, but at some future time you might 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}] 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 nine more than 8?

2016-08-23 03:23:01

edwin

Hi Allen,

I used the following codes and could not open my default worksheet. Can you please help.

Sub Workbook_Open()
Worksheets("Test").Activate
Range("B1").Select
End Sub

Many thanks

Edwin


2016-08-09 05:56:22

Morton Wakeland

Al:
Where may I ask you a question regarding EMAIL MERGE - using Word for a document, Excel as the "database" and Outlook to send out emails? I know how to do email merge for one record = one row of info. But when it comes to inserting multiple rows of information for the same record, well, after 3 days of searching, I'm thoroughly lost!! Thank you, Mort


2016-08-09 02:29:54

Deepak

Great, worked perfectly!! Thanks a lot for your help..


2016-07-15 05:32:36

Barry

Preetam

The code you cite needs to be located on the “ThisWorkbook” codepage.


2016-07-14 11:37:04

preetam

Hi Allen

I have a workbook and I want to default to the "Control Panel" tab when a user opens the spreadsheet / workbook. I've used the code above but it does not work

Private Sub Workbook_Open()
Worksheets("Control Panel").Activate
End Sub

The code is in a module or does have to be in the worksheet?


2015-07-06 10:39:14

David Smith

This is a great tip -- I like to create an index/summary page for all of my workbooks that provides documentation of the contents, such as a table of contents, FAQ, or warnings. Now my users will have to look at this page every time they open the workbook.


2015-07-06 09:40:00

Wes Kehler

When I receive an attachment in excell format, I can't seem to open that worksheet.

I get everything from the past and I fumble around sometimes for half an hour trying to open what was just sent to me.

Is there a way to get the current attachment to open immediately?


2015-07-06 08:57:49

James

Cheers, worked a treat. Needed to save it as a macro-enabled file.


2015-07-06 06:13:39

Derek Bates

Short & sweet. But none the less useful.


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.