2
2hOt
I've been trying to Get Excel to Change Worksheet Protection Passwor
using the -Locked Property -without success.
THIS IS THE SITUATION
*1.* I had the properties (format) of specific ranges set t
'Unlocked'
*2.* I then protected the Worksheet containing those ranges with
password
*3.* I now tried to unlock the Worksheet and set those specific cell
to 'locked' *programmatically*
e.g
Code
-------------------
worksheet(1).Unprotect('the password')
worksheets(1).range("X11:Y34").locked = Fals
-------------------
where range("X11:Y34") represents the specific unlocked cells
RESULT
I get and Error Message:
Run-time Error 1004. Could not set Range Class property.
What did I do wrong
using the -Locked Property -without success.
THIS IS THE SITUATION
*1.* I had the properties (format) of specific ranges set t
'Unlocked'
*2.* I then protected the Worksheet containing those ranges with
password
*3.* I now tried to unlock the Worksheet and set those specific cell
to 'locked' *programmatically*
e.g
Code
-------------------
worksheet(1).Unprotect('the password')
worksheets(1).range("X11:Y34").locked = Fals
-------------------
where range("X11:Y34") represents the specific unlocked cells
RESULT
I get and Error Message:
Run-time Error 1004. Could not set Range Class property.
What did I do wrong