The first thing to understand is that Excel Security is VERY poor. That being said for the average user this may be sufficient. I have written some code and password protected the code in the VB editor - the password is "password" - this will let you see the code - if the code is password protected the average user will not be able to see the code therefore they cannot see the password hidden in the code.
I have added a button to sheet 1 that opens an Inputbox - it asks for a password - the password is "password". If the user enters the correct password then Sheet2 is made visible. The user will not be able to unhide the worksheet.
When the workbook opens it hides sheet2 if it is visible and on closing the workbook it checks to see if sheet 2 is visible and if it is it will hide the sheet prior to the workbook being closed. You need to understand this is easy to crack however as I say for the average user it will probably be sufficient.
In the workbook code
In a module
See attached workbook. Remember Excel security is very poor!!!!
Bookmarks