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: Automatically Hiding the Personal Workbook.

Automatically Hiding the Personal Workbook

Written by Allen Wyatt (last updated July 29, 2022)
This tip applies to Excel 97, 2000, 2002, and 2003


Ken is having a problem with his Personal.xls workbook. When he needs to work on it, he unhides it. If he forgets to rehide it when he is done, then the next time he starts Excel the Personal.xls workbook is immediately visible. Since it looks like a new, blank worksheet, he often starts typing in it and this messes up her Personal.xls workbook. He wonders if there is a way to automatically force Personal.xls to be hidden if he forgets to hide it manually.

There are a couple of things you need to keep in mind. First, if you are only making changes to macros in Personal.xls, you don't need to unhide the workbook to work on those macros. Instead, display the VBA editor and use the object browser to make sure you are working on the macros in the Personal.xls workbook. When you are done editing the macros, you can save them without ever needing to make the workbook visible.

If this still doesn't work for you—perhaps you have some other reason to make Personal.xls visible—then you could make some sort of editing change to the first worksheet in the workbook. For instance, place the text "THIS IS PERSONAL" into cell A1 of the workbook. Do something to make it stand out (bold, colors, flashing, etc.), and you will never again miss that you are working in the Personal.xls workbook when you first start Excel.

If you want a macro approach to make sure that the workbook is hidden, then you could add the following code to the ThisWorkbook object for Personal.xls:

Private Sub Workbook_BeforeClose(Cancel As Boolean)
    Windows("PERSONAL.XLS").Visible = False
    ThisWorkbook.Save
End Sub

The macro is executed just before the workbook is closed (when happens when Excel is exited). It hides the workbook and then saves it. That way, the next time you start Excel, Personal.xls will be automatically hidden.

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 (3371) 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: Automatically Hiding the Personal Workbook.

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

Making Backup Copies

When you save your documents, Word doesn't normally make backups of your files. If you want the program to do that, it ...

Discover More

Collating Copies

If you are printing more than one copy of a multi-page document, it would be great if Word could print them in complete ...

Discover More

Moving Part of a Footer Down a Line

Setting up a single footer line for your printouts is fairly easy. If you want to move part of the footer down a line so ...

Discover More

Program Successfully in Excel! John Walkenbach's name is synonymous with excellence in deciphering complex technical topics. With this comprehensive guide, "Mr. Spreadsheet" shows how to maximize your Excel experience using professional spreadsheet application development tips from his own personal bookshelf. Check out Excel 2013 Power Programming with VBA today!

More ExcelTips (menu)

Problems with Default Workbook and Worksheet Templates

You can create a default template for both your workbooks and worksheets. These should be placed in the xlstart folder, ...

Discover More

Printing Workbooks in a Folder

This tip presents two techniques you can use to print multiple workbooks all at the same time. Both techniques involve ...

Discover More

Creating Individual Workbooks

Workbooks can contain many worksheets. If you want to pull a workbook apart and create a whole series of workbooks based ...

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 6 + 5?

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.