![disable macros in excel on an open sheet disable macros in excel on an open sheet](http://spreadsheet1.com/uploads/3/4/3/6/34364573/2357097_orig.jpg)
If there are multiple worksheets needed to be hidden when opening the workbook, here is also a code can help you.ġ. When you open this workbook next time, please click Enable Content button firstly, and then your specify sheet will be hidden automatically. Then save and close this code window, and click File > Save As to save this workbook as Excel Macro-Enabled Workbook format, see screenshot:Ĥ. Note: In the above code, Sheet5 is the sheet name that you want to hide on open.
![disable macros in excel on an open sheet disable macros in excel on an open sheet](https://images.tips.net/S22/Figs/T12139F1.png)
VBA code: Hide a specific sheet when opening a workbook: Private Sub Workbook_Open() In the left Project-VBAProject pane, double click the ThisWorkbook to open a blank Module, and then copy and paste the following code into the Module: Hold down the ALT + F11 keys to open the Microsoft Visual Basic for Applications window.Ģ. If you want to hide one specific worksheet when opening the workbook, you can apply the following VBA code.ġ. Hide some specific worksheets automatically when opening a workbook with VBA code Hide a specific worksheet automatically when opening a workbook with VBA code If you need to hide some specific worksheets automatically when someone opens the workbook, how could you deal with this job in Excel?
DISABLE MACROS IN EXCEL ON AN OPEN SHEET HOW TO
How to automatically hide specific worksheets when opening an Excel file?