I keep getting the following error message:
Run-time error '1004' Unable to set the Locked Property of the Range Class
I want to unlock the cell if the checkbox is checked and when it is not I want to set the cell to a formula and lock it.
Please help
Thank you![]()
Private Sub Check_Box_Click() Worksheets("Sheet1").Unprotect ("password") If Check_Box = True Then Worksheets("Sheet1").Range("BB9").Locked = False ElseIf Check_Box = False Then Range("BB9").Formula = SpigDia(BB5, BB6) Worksheets("Check_Box").Range("BB9").Locked = True End If Worksheets("Check_Box").Protect ("password") End Sub
Bookmarks