1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
| Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Target.Address = "$C$8" Then
Set d = CreateObject("Scripting.Dictionary")
For Each c In [ticket]: d(c.Value) = "": Next c
Target.Validation.Delete
Target.Validation.Add xlValidateList, Formula1:=Join(d.keys, ",")
End If
If Target.Address = "$D$8" Then
Set d = CreateObject("Scripting.Dictionary")
For Each c In [Engin]: d(c.Value) = "": Next c
Target.Validation.Delete
Target.Validation.Add xlValidateList, Formula1:=Join(d.keys, ",")
End If
End Sub |
Partager