Hello, I am continually running into an issue when trying to protect my workbook with macro's
I have a workbook with 12 sheets.
Upon workbook_open, I hide them all, except the first which is protected completely, no one can even click on a cell. At the end of the code, I protect the workbook with a password, lets call it "hello". protecting the workbook will restrict the user from running a macro to unhide the other (unprotected) worksheets.
*Sure, I could protect every sheet with a macro, but I am going to be using each of those 12 sheets on a daily basis and don't want to have to enter a password to unprotect the sheet 12 times. I want to go around this, by letting the user put in a password once, unprotect the workbook, unhide all the worksheets, and unprotect the first one.*
**The workbook is just a template**
When I add the code to unprotect the workbook at the start of workbook_Open, and re-open the workbook, macros have been disabled, and there is no way to re-enable them.
Essentially, I have 2 questions:
1. Is it possible to enter a password for the workbook before Excel even opens up?
OR,
2. how do I go about protecting my workbook so that nobody can see the 11 other worksheets, and protect my code (I have to protect the code because the password is in there).
Cheers,
I have a workbook with 12 sheets.
Upon workbook_open, I hide them all, except the first which is protected completely, no one can even click on a cell. At the end of the code, I protect the workbook with a password, lets call it "hello". protecting the workbook will restrict the user from running a macro to unhide the other (unprotected) worksheets.
*Sure, I could protect every sheet with a macro, but I am going to be using each of those 12 sheets on a daily basis and don't want to have to enter a password to unprotect the sheet 12 times. I want to go around this, by letting the user put in a password once, unprotect the workbook, unhide all the worksheets, and unprotect the first one.*
**The workbook is just a template**
When I add the code to unprotect the workbook at the start of workbook_Open, and re-open the workbook, macros have been disabled, and there is no way to re-enable them.
Essentially, I have 2 questions:
1. Is it possible to enter a password for the workbook before Excel even opens up?
OR,
2. how do I go about protecting my workbook so that nobody can see the 11 other worksheets, and protect my code (I have to protect the code because the password is in there).
Cheers,