password change again
Libby,
sheet1.unprotect passwor:= sheet3.range("a65536").end
(xlup).value
Is the above a typo????
Should be sheet1.unprotect password
Also, are you sure that the value you're getting is the one that
you want???
Try
MSgBox sheet3.range("a65536").end(xlup).value
just before that line of code to see what's there.
Also...would be better to use
Worksheets("Sheet3") as opposed to just Sheet3
Thanks to John for setting me on the right track.
I've now got the passwords in a veryhidden sheet.
You're welcome
John
"Libby" wrote in message
...
The plan is to allow a user to change worksheet, workbook
and some textbox passwords via a button on the sheet and
then a form. This is so I can code the thing but if they
want to change the passwords they don't have to keep
coming back to me to change the code.
Thanks to John for setting me on the right track.
I've now got the passwords in a veryhidden sheet.
However when the user clicks the button on the sheet to
change the password, I have to unprotect the sheet with
the old password, protect it with the new one and save the
sheet. The trouble is I've getting run time errors on the
unprotect and protect bits
sheet1.unprotect passwor:= sheet3.range("a65536").end
(xlup).value
The errors normally method unprotect of object failed.
Any ideas?
|