blackie42
10-29-2016, 09:24 AM
Hi,
Using following to lock a column & prevent additional rows columns being created.
Private Sub protectit()
Cells.Locked = False
Range("A1:A2000").Locked = True
ActiveSheet.Protect AllowInsertingRows:=False, AllowInsertingColumns:=False
ActiveSheet.Protect Password:="Test"
End Sub
However just selecting 'unprotect sheet' on ribbon deactivates without asking for password.
Any ideas?
thanks
Jon
Using following to lock a column & prevent additional rows columns being created.
Private Sub protectit()
Cells.Locked = False
Range("A1:A2000").Locked = True
ActiveSheet.Protect AllowInsertingRows:=False, AllowInsertingColumns:=False
ActiveSheet.Protect Password:="Test"
End Sub
However just selecting 'unprotect sheet' on ribbon deactivates without asking for password.
Any ideas?
thanks
Jon