Hi guys,
I'm planning to put in a command button with function to detect if all the worksheet is protected, if not protected it will protect all the worksheet with a user entered password, else if all the worksheet is protected then it will prompt a msgbox for user to enter password to unlock.
For example if the file is locked by default
When the user click the button, they would need to enter the password. If the file is not locked by default, by clicking the same button the user can enter the password and lock the file.
Any idea on how to code it?
I'm planning to put in a command button with function to detect if all the worksheet is protected, if not protected it will protect all the worksheet with a user entered password, else if all the worksheet is protected then it will prompt a msgbox for user to enter password to unlock.
For example if the file is locked by default
When the user click the button, they would need to enter the password. If the file is not locked by default, by clicking the same button the user can enter the password and lock the file.
Any idea on how to code it?