Hi,
I have written a code to lock the cells in the worksheet, which is assigned to a button
Now, I'am working on a macro to unlock the cells (A1:A54) in the worksheet which will be assigned to a different button, but several attempts failed.
Please assist me in tweaking the above code to achieve the unlock cells code.
I have written a code to lock the cells in the worksheet, which is assigned to a button
Code:
Sub CellLocker()
Cells.Select
Selection.Locked = false
Range("A1:A54").Select
Selection.Locked = true
ActiveSheet.Protect DrawingObjects:=false, Contents:=true, Scenarios:=false
End Sub
Now, I'am working on a macro to unlock the cells (A1:A54) in the worksheet which will be assigned to a different button, but several attempts failed.
Please assist me in tweaking the above code to achieve the unlock cells code.
