I've been trying to Get Excel to Change Worksheet Protection Password using the Locked Property without success.

This is the situation:

1. I had the properties (format) of specific ranges set to 'Unlocked'
2. I then protected the Worksheet containing those ranges with a password
3. I now tried to unlock the Worksheet and set those specific cells to 'locked' programmatically
e.g
worksheet(1).Unprotect('the password')
worksheets(1).range("X11:Y34").locked = False
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?