Private Sub Worksheet_Change(ByVal Target As Range)
Dim Ligne As Long, Plage As Range, L As Variant
On Error Resume Next
L = Target.Validation.Formula1
If Err.Number > 0 Then
Err.Clear
Exit Sub
End If
If Target.Count = 1 Then
L = Target.Row
If Target <> "" Then
With Sheets("Traction ambiante")
Ligne = Application.Match(Target, .[B:B], 0)
If IsNumeric(Ligne) Then
Set Plage = .Range(.Cells(Ligne + 1, 2), .Cells(Ligne + 1, 2).End(xlDown)).Resize(, 8)
Application.EnableEvents = False
Range("A" & L + 2 & ":I" & 10000).ClearContents
Plage.Copy
Range("A" & L + 2).Resize(Plage.Rows.Count, 8).Value = Plage.Value
Application.EnableEvents = True
End If
End With
End If
ElseIf Target.Count = 2 And Target(1) = "" Then
On Error Resume Next
L = Target.Validation.Formula1
If Err.Number > 0 Then
Err.Clear
Exit Sub
End If
L = Target.Row
Application.EnableEvents = False
Range("A" & L + 2 & ":I" & 10000).ClearContents
Application.EnableEvents = True
End If
End Sub