Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- https://excel-egy.com/forum/t3995
- ---------------------------------
- Sub Allow_Users_To_Edit_Specific_Range()
- Dim ws As Worksheet, lr As Long
- Set ws = ActiveSheet
- With ws
- If .Range("A1") = "Yes" Then
- .Unprotect
- lr = .Cells(Rows.Count, 3).End(xlUp).Row
- .Cells.Locked = True
- .Range("A5:A" & lr).Locked = False
- .Protect
- End If
- End With
- End Sub
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement