Dim validation As Boolean
Dim validation1 As Boolean
Dim validation2 As Boolean
Dim trouvé As Boolean
Dim trouvé1 As Boolean
Dim trouvé2 As Boolean
validation = False
validation1 = False
validation2 = False
For Each cellule In Sheets("XXXX_test").Range("LISTE_TEST")
If Target.Value = cellule.Value Then trouvé = True
Next
On Error Resume Next
validation = Target.validation.InCellDropdown
If validation = True And trouvé = False Then Target.ClearContents
On Error GoTo 0
For Each cellule In Sheets("XXXX_FRN").Range("liste_fournisseur")
If Target.Value = cellule.Value Then trouvé1 = True
Next
On Error Resume Next
validation1 = Target.validation1.InCellDropdown
If validation1 = True And trouvé1 = False Then Target.ClearContents
On Error GoTo 0
For Each cellule In Sheets("XXXX_NIVEAU").Range("liste_niveau")
If Target.Value = cellule.Value Then trouvé2 = True
Next
On Error Resume Next
validation2 = Target.validation2.InCellDropdown
If validation2 = True And trouvé2 = False Then Target.ClearContents
On Error GoTo 0
End Sub
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Application.EnableEvents = False
If Not Intersect(Cells.SpecialCells(xlCellTypeAllValidation), Target) Is Nothing Then
Application.CutCopyMode = False
End If
Application.EnableEvents = True
End Sub