This might be in the wrong place. My question pertains to MS Excel, and using Visual Basic for Applications (VBA).
We have a user that would like to hide one of her worksheets within a workbook. She would like the sheet to be securely hidden.
I found this piece of code:
Sub HideSheet() Sheets("Sheet2").Visible = xlVeryHidden End Sub
and the sheet does disappear.
There are two problems:
1) I don't like the Macro warning. Hints that something might be up, and if they disable the macros, then this visibility thing does not work.
2) Anyone can go into the Visual Basic for Applications menu, and see all of the worksheets in broad daylight. They can highlight the hidden sheet, and go to the properties, and unhide it with their mouse. Data revealed.
I am going to discuss with the user the wisdom of trying to do this. If she wants to go ahead though, and do "security through obscurity", then that is her call. What I want to be sure of though is that there isn't any other way to place a password on the VBA menu, or perhaps prevent the sheets from displaying on the VBA menu.
If anyone has ideas, please let me know. I am not very proficient in VBA, so please spell out the steps taken.