I would like to hide several worksheets within a workbook (Excel 2010) and require a password to unhide some of them, but not all of them (so I do not want to protect the whole workbook structure). I found the instructions below on another user forum which
seemed to be exactly what I was looking for. I followed these steps, and everything worked as described, except when I return to the VBA properties window for the worksheets where I set the Visible property to "veryhidden", I am able to change the setting
to Visible or Hidden and am not prompted for the password I entered for the VBA project. Is there another step/setting not described below that is needed to prompt for the password before the user would be able to view or change the properties for the worksheet?
- Go into the screen (press Alt-F11)
- Select the sheet you want to hide in the Project Explorer (press Ctrl-R if you don't see it)
- In the Properties Window (F4 if you don't see it) change the 'Visible' property to '2 - xlSheetVeryHidden'
- Then set a password for the VBAProject like this:
- 'Tools' menu up at the top
- Select 'VBAProject Properties...'
- Select 'Protection' tab
- Check the Checkbox for 'Lock project for viewing'
- Enter and Confirm your password below.
- Click 'OK'
This will password protect your whole Project if that works for you, but you wouldn't be able to unhide the worksheet unless you entered the Project by typeing the password.