|re: "The reason why I did that is because anyone can just come in and un-hide the worksheets if they know how."|
I guess if I was feeling malicious, I'd just open the VBA editor, read the password from the code and unhide the worksheets. I might even change the password, or worse yet, change the code to have it do what wanted it to do.
If you are going to put a password in a macro, then you really should set the VBAProject properties to "Lock Project For Viewing" and then password protect it.
"When the user is done, make sure they click the Protect Workbook button to run the ProtectWorkbook macro"
Leaving it up to the user to Protect the workbook when they are done is very dangerous. Users forget things, users can be malicious, users are a pain.
At a minimum I'd use the BeforeClose event to hide sheets and set the protection for the workbook, but even that is not foolproof since the user might not close the workbook.
We would need to know a lot more about how your users will be using the workbook before we could offer suggestions on how to make it a bit more bulletproof.
Click Here Before Posting Data or VBA Code ---> How To Post Data or Code.