Pinaceous
Well-known Member
- Joined
- Jun 11, 2014
- Messages
- 1,124
- Office Version
- 365
- Platform
- Windows
Hi All,
I'm trying to out a condition whereby if my sub produces a "Positive result" then that row gets locked.
I'm working with Column B in range of ("B8:B66"):
So, here if there is a "Positive result" it will lock row 10.
But now how do I tell the code, if entry of row whatever, for example Row 7 to 66, if it produces a "Positive result" its row becomes locked.
Please let me know, if you have any suggestions that I can toy around with.
Thank you,
pinaceous
I'm trying to out a condition whereby if my sub produces a "Positive result" then that row gets locked.
I'm working with Column B in range of ("B8:B66"):
Code:
x = ActiveSheet.Range("B8:B66")
Code:
found = True
For Each cell In Range("B8:B66").Cells
If cell.Value = "X" Then
found = True
End If
Next
If found = True Then
MsgBox "Positive result"
'Range("B10:M10").Locked = True
Else
MsgBox "Negative result"
End If
So, here if there is a "Positive result" it will lock row 10.
But now how do I tell the code, if entry of row whatever, for example Row 7 to 66, if it produces a "Positive result" its row becomes locked.
Please let me know, if you have any suggestions that I can toy around with.
Thank you,
pinaceous