dparteka
Member
I could use help with this, I've gotten the CommandButton portion to work but I'm stuck on the unlocking the range part, if someone out there could enlighten me I’d really appreciate it... thank you for looking
Code:
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
'Unlock L5:L6 when N5 = "?" and make commandbutton11 visible when N5 = "!"
Dim KeyCells As Range
Set KeyCells = Sheet1.Range("N5")
If KeyCells.Value = "?" Then
Range("L5:L6").Locked = False
Else
Range("L5:L6").Locked = True
End If
If KeyCells.Value = "!" Then
CommandButton11.Visible = True
Else
CommandButton11.Visible = False
End If
End Sub