Please Note: This article is written for users of the following Microsoft Excel versions: 2007, 2010, 2013, 2016, 2019, Excel in Microsoft 365, and 2021. 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.
Written by Allen Wyatt (last updated May 18, 2024)
This tip applies to Excel 2007, 2010, 2013, 2016, 2019, Excel in Microsoft 365, and 2021
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 may not need to unhide the workbook to work on those macros. In some versions of Excel you can 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 that approach doesn't work for you or, 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:
ExcelTips is your source for cost-effective Microsoft Excel training. This tip (12159) applies to Microsoft Excel 2007, 2010, 2013, 2016, 2019, Excel in Microsoft 365, and 2021. You can find a version of this tip for the older menu interface of Excel here: Automatically Hiding the Personal Workbook.
Create Custom Apps with VBA! Discover how to extend the capabilities of Office 2013 (Word, Excel, PowerPoint, Outlook, and Access) with VBA programming, using it for writing macros, automating Office applications, and creating custom applications. Check out Mastering VBA for Office 2013 today!
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 MoreThe Personal workbook is a special place used to store information and macros that you can access from all the other ...
Discover MoreNeed to move a macro out of your Personal.xlsb workbook and into a regular workbook? You can do it using familiar editing ...
Discover MoreFREE SERVICE: Get tips like this every week in ExcelTips, a free productivity newsletter. Enter your address and click "Subscribe."
There are currently no comments for this tip. (Be the first to leave your comment—just use the simple form above!)
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.
FREE SERVICE: Get tips like this every week in ExcelTips, a free productivity newsletter. Enter your address and click "Subscribe."
Copyright © 2024 Sharon Parq Associates, Inc.
Comments