K0st4din
Active Member
- Joined
- Feb 8, 2012
- Messages
- 488
- Office Version
- 2016
- 2013
- 2011
- 2010
- 2007
- Platform
- Windows
Hello, everyone,
I searched the internet and found something similar to what I am looking for, but it is not accurate.
I'm looking for a way if in column B8:B38 contains the letter O in a cell, to lock the whole row in the range(row) D:G.
Example: If B12 is O, then Lock rows D12:G12 and ect....
What I found is the following, but not exactly
I ask for your cooperation
Thanks in advance
I searched the internet and found something similar to what I am looking for, but it is not accurate.
I'm looking for a way if in column B8:B38 contains the letter O in a cell, to lock the whole row in the range(row) D:G.
Example: If B12 is O, then Lock rows D12:G12 and ect....
What I found is the following, but not exactly
I ask for your cooperation
Thanks in advance
VBA Code:
Private Sub Worksheet_Change(ByVal Target As Range)
If Range("A1") = "Accepting" Then
Range("B1:B4").Locked = False
ElseIf Range("A1") = "Refusing" Then
Range("B1:B4").Locked = True
End If
End Sub