Please Note: This article is written for users of the following Microsoft Excel versions: 2007, 2010, 2013, and 2016. 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: Automatically Hiding the Personal Workbook.

Automatically Hiding the Personal Workbook

Written by Allen Wyatt (last updated May 4, 2021)
This tip applies to Excel 2007, 2010, 2013, and 2016


4

Ken is having a problem with his Personal.xlsb workbook. When he needs to work on it, he unhides it. If he forgets to hide it again when he is done, then the next time he starts Excel the Personal.xlsb workbook is immediately visible. Since it looks like a new, blank worksheet, he often starts typing in it and this messes up his Personal.xlsb workbook. He wonders if there is a way to automatically force Personal.xlsb 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.xlsb, 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.xlsb 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.xlsb 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 (large, bold, colors, etc.), and you will never again miss that you are working in the Personal 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.xlsb:

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

The macro is executed just before the workbook is closed (which happens when Excel is exited). It hides the workbook and then saves it. That way, the next time you start Excel, Personal.xlsb 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 (12159) applies to Microsoft Excel 2007, 2010, 2013, and 2016. You can find a version of this tip for the older menu interface of Excel 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

Adjusting Test Scores Proportionately

Teachers often grade on what is affectionately referred to as "the curve." The problem is, it can be a bit difficult to ...

Discover More

Pasting without Updating References

Do you need to paste formulas without updating the references in whatever you are pasting? You can accomplish this, ...

Discover More

Turning Headers On and Off

Normally Excel displays row and column headers in a worksheet. If you prefer, you can turn these navigational aids off ...

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 (ribbon)

Personal Workbook Fails to Load

The Personal workbook is special; it is where you can store macros you want to use all the time in Excel. What do you do, ...

Discover More

Moving Macros from the Personal Workbook

Need to move a macro out of your Personal.xlsb workbook and into a regular workbook? You can do it using familiar editing ...

Discover More

Opening Personal.xlsb

If you start up Excel and all you see is your Personal.xlsb file, then you may wonder what you are doing wrong. The ...

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 four minus 0?

2024-02-06 10:41:32

n30n6r33n

the macro for the personal workbook object worked the 2nd time i tried it - was so glad!


2022-05-14 16:40:15

Jan Burch

Hi Allen,

Thanks for this article.

I keep personal.xlsb hidden, but if I open a new blank workbook, and go into Developer > Macro and select a macro in personal.xlsb to edit, I get error message: "Cannot edit a macro on a hidden workbook. Unhide the workbook using the Unhide command." Your article says I don't have to unhide it to edit a macro. Is there something I should be doing?

Thanks,
Jan


2020-09-06 08:42:05

Ron S MVP

It's not working for me ...

(see Figure 1 below)

Figure 1. 


2017-06-10 12:22:55

Dean Cardno

You could also save it as an add-in, set to load for each session


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.