I have an Excel form that is being emailed to different parties to complete various parts of the form. I would like to unlock the appropriate cells for each group and unlock all others. I am using code like the following:
Call Worksheets("sheet1").Unpro
tect(Works
heets("she
et2").Rang
e("PWD"))
Worksheets("sheet1").Range
("reqBy").
Locked = True
When this runs I get runtime Error 1004: Unprotect method of worksheet object failed. Sometimes I also get an error about the locked property being unavailable.
Any ideas as to why I can not programatically unprotect the spreadsheet?
Start Free Trial