HWL
Active Member
- Joined
- Dec 1, 2009
- Messages
- 462
From all accounts, the following code should work:
ThisWorkbook.Sheets(1).Range("b13").Locked = False
To set the locked property of B13 on sheet(1) to False (unlocked)
Neither the workbook or worksheet is currently protected, so that's not the problem yet I get this compiling error:
SOLVED:
Well, that was easy enough, the cell I was trying to modified is merged with C13 and D13, so you have to select the entire range to change. Works fine now.
ThisWorkbook.Sheets(1).Range("b13").Locked = False
To set the locked property of B13 on sheet(1) to False (unlocked)
Neither the workbook or worksheet is currently protected, so that's not the problem yet I get this compiling error:
What am I missing?Run-time Error '1004'
Unable to set the Locked property of range class
SOLVED:
Well, that was easy enough, the cell I was trying to modified is merged with C13 and D13, so you have to select the entire range to change. Works fine now.
Last edited: