Abhi86
New member
I am using below mentioned code to protect my sheets through VBA in excel:
sh1.Protect Password:="abcd"
sh2.Protect Password:="efgh"
Once i run the code it locks my sheets and password i require to unprotect them is "abcd" and "efgh" respectively. If i change the password manually by using the protect sheet from review ribbon from say "abcd" and "efgh" to "1234" and "5678" and re run the code, password i require to unprotect the sheets are "1234" and "4567" instead of "abcd" and "efgh". Is there any way by which i can avoid this, as i do not want default password to get overwrite manually.
:frusty::frusty::frusty:
I will be thankful for the solution.
sh1.Protect Password:="abcd"
sh2.Protect Password:="efgh"
Once i run the code it locks my sheets and password i require to unprotect them is "abcd" and "efgh" respectively. If i change the password manually by using the protect sheet from review ribbon from say "abcd" and "efgh" to "1234" and "5678" and re run the code, password i require to unprotect the sheets are "1234" and "4567" instead of "abcd" and "efgh". Is there any way by which i can avoid this, as i do not want default password to get overwrite manually.
:frusty::frusty::frusty:
I will be thankful for the solution.