Hi,
Started a new thread so as to no hijack the previous one... hope that's correct protocol.
What I want to accomplish: B1 has a dropdown menu and if no selections have been made then any attempt to select A1 will result in B1 being selected (highlighted) as a reminder to the user that a dropdown selection must first be done.
In the thread (https://www.mrexcel.com/forum/excel-questions/477560-conditional-locked-cells.html)
I like the way that works with the locking of the sheet (which is something I'll be doing anyway); however, I wasn't able to figure out how to edit the code to cause the same action as THIS code does:
Thanks,
Bwanna
Started a new thread so as to no hijack the previous one... hope that's correct protocol.
What I want to accomplish: B1 has a dropdown menu and if no selections have been made then any attempt to select A1 will result in B1 being selected (highlighted) as a reminder to the user that a dropdown selection must first be done.
In the thread (https://www.mrexcel.com/forum/excel-questions/477560-conditional-locked-cells.html)
Code:
Private Sub Worksheet_Change(ByVal Target As Range)
If Not (Intersect(Target, Range("K2:K22")) Is Nothing) And Target.Cells.Count = 1 Then
ActiveSheet.Unprotect
If Target.Value = "Disagree" Then
Target.Offset(0, 1).Locked = False
Else
Target.Offset(0, 1).Locked = True
End If
ActiveSheet.Protect
End If
End Sub
I like the way that works with the locking of the sheet (which is something I'll be doing anyway); however, I wasn't able to figure out how to edit the code to cause the same action as THIS code does:
Code:
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Target.Cells.Count > 1 Then Exit Sub
If Not Intersect(Target, Range("A1")) Is Nothing Then
If [B1] = ISBLANK Then
Application.EnableEvents = False
[B1].Select
Application.EnableEvents = True
End If
End If
Thanks,
Bwanna