I have a protected sheet , but the cells B12:B27 are not locked . this code is not working with locked sheets. any idea?.
If Not Application.Intersect(Target, Range("B12:B37")) Is Nothing Then
With Range("B" & ActiveCell.Row).Validation
.Delete
.Add Type:=xlValidateList, AlertStyle:=xlValidAlertStop, Operator:= _
xlBetween, Formula1:="B,E,R,TG,TU,V"
End With
End If
Thanks