Drop Down Menu

  • Thread starter Thread starter Diana
  • Start date Start date
D

Diana

Hi

How can I lock a dropdwown menu only from adding anything other than what I
have on the list. I have the show error alert clicked but it is still
allowing me add to the list. Is there a specific source or data validation I
need to type. I am only want to lock the dropdown menu on my worksheet.

Thank you
 
use protection(Tool, protection). Protect the sheet or the cell or a range
you want to prevent someone from changing. To activate protection, the cell
must be locked(Format, protection, mark locked).
Hope it helps, goodluck
=================
 
Hello,

Suppress error alert in DropDown:

Private Sub Worksheet_Change(ByVal Target As Range)
If Not Intersect(Range("A2,A4"), Target) Is Nothing Then
Application.EnableEvents = False
If Left(Target.Validation.Formula1, 1) = "=" Then ' List in
WorkSheet
NameList = Mid(Target.Validation.Formula1, 2)
If IsError(Application.Match(Target.Value, Range(NameList), 0))
Then
'MsgBox "Error!"
Target = Empty
End If
Else
temp = Target.Validation.Formula1 ' List in
DropDown
p = InStr(temp, Target.Value)
If p = 0 Then
Target = Empty
End If
End If
Application.EnableEvents = True
End If
End Sub

http://cjoint.com/?bsgDYsZG86

JB
http://boisgontierjacques.free.fr
 
Back
Top