Hide an excel sheet without the option of unhiding it using VBA in Microsoft Excel





To hide a sheet so that no body can unhide it without knowing the password for the Vb Project, simply open the VB Editor and change the visible property to 2 i.e. xlsheetveryhidden.

The sheet should disappear from the Unhide sheets command.

The only way to unhide it is to change the property back to 0 i.e. xlSheetNormal using the password to the VBProject.

Screenshot // Hide an excel sheet without the option of unhiding it using VBA in Microsoft Excel
Hide an excel sheet without the option of unhiding it using VBA in Microsoft Excel



8 thoughts on “Hide an excel sheet without the option of unhiding it using VBA in Microsoft Excel

  1. A Small Explanation: If the workbook is not protected then a person can unhide this worksheet if he knows that the Worksheet exists as we can use the sheets collection and we can refer to the property with sheets(i).visible property. (Thanks Mandar – my brother for pointing this mistake)

  2. “This all seems fine but I have created an XLA add-in that contains some worksheets with data and some VBA code.
    Now, I believe since I moved to a newer version of Excel when I open XLA document I can see the VBA code there but no worksheets and I am not able to change any data.
    There is no option to “”unhide”” anything because XLA workbook itself is hidden in Excel.
    How can I get to my worksheets in the XLA in order to change the data there ?

    Thanks”

  3. “I have just found an answer so I am going to answer myself.
    When XLA add-in is loaded one can go to VB editor select that add-in in the project explorer and ThisWorkbook item/propety underneath and it’s “”isAddIn”” property which can then be set to True. Immediatelly this will unhide hidden workseets belonging to this XLA in the Excel.”

  4. A Small Explanation: If the workbook is not protected then a person can unhide this worksheet if he knows that the Worksheet exists as we can use the sheets collection and we can refer to the property with sheets(i).visible property. (Thanks Mandar – my brother for pointing this mistake)

  5. “This all seems fine but I have created an XLA add-in that contains some worksheets with data and some VBA code. Now, I believe since I moved to a newer version of Excel when I open XLA document I can see the VBA code there but no worksheets and I am not able to change any data. There is no option to “”unhide”” anything because XLA workbook itself is hidden in Excel. How can I get to my worksheets in the XLA in order to change the data there ?
    Thanks”

  6. “I have just found an answer so I am going to answer myself.
    When XLA add-in is loaded one can go to VB editor select that add-in in the project explorer and ThisWorkbook item/propety underneath and it’s “”isAddIn”” property which can then be set to True. Immediatelly this will unhide hidden workseets belonging to this XLA in the Excel.”

Leave a Reply

Your email address will not be published. Required fields are marked *


four + = 6

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>