Pinaceous
Well-known Member
- Joined
- Jun 11, 2014
- Messages
- 1,124
- Office Version
- 365
- Platform
- Windows
Hi All,
I’m trying to work out a condition where:
In using the Case Select or an If statement for three conditions.
If cell B11 is between sDate1 & sDate2 then it locks OR protects its row Range("B11:M11").
MsgBox d & “Within Date Range”
If cell B11 is greater or less then sDate1 & sDate2 thenit does NOT lock its row Range("B11:M11").
MsgBox d & “Outside of Date Range”
Can someone help me piece this together?
The hard part I'm experiencing is locking/protecting only that row's range.
I seem to be locking every row.
Please help me, if you can.
Thank you,
Pinaceous
I’m trying to work out a condition where:
Code:
[FONT=Calibri][SIZE=3][COLOR=#000000] Dim sDate1 As Date[/COLOR][/SIZE][/FONT]
[FONT=Calibri][SIZE=3][COLOR=#000000] Dim sDate2 As Date[/COLOR][/SIZE][/FONT]
[FONT=Calibri][SIZE=3][COLOR=#000000] sDate1 = #10/1/2019#[/COLOR][/SIZE][/FONT]
[FONT=Calibri][SIZE=3][COLOR=#000000] sDate2 = #9/30/2020#
[/COLOR][/SIZE][/FONT]
In using the Case Select or an If statement for three conditions.
If cell B11 is between sDate1 & sDate2 then it locks OR protects its row Range("B11:M11").
MsgBox d & “Within Date Range”
If cell B11 is greater or less then sDate1 & sDate2 thenit does NOT lock its row Range("B11:M11").
MsgBox d & “Outside of Date Range”
Can someone help me piece this together?
The hard part I'm experiencing is locking/protecting only that row's range.
I seem to be locking every row.
Please help me, if you can.
Thank you,
Pinaceous
Last edited: