Private Sub TextBox1_Change()
On Error Resume Next
Dim Cible As String
Dim x As Long
Cible = TextBox1
i = Range("A" & Rows.Count).End(xlUp).Row + 1
If Len(TextBox1.Text) = 4 And ToggleButton1 = False Then
Cells(i, 1) = TextBox1
TextBox2.SetFocus
ElseIf Len(TextBox1.Text) = 4 And ToggleButton1 = True Then x = Application.Match(Cible, Range("A2:A65000"), 0) + 1
If x = 0 Then TextBox1 = ""
ElseIf Cells(x, 2) = TextBox2 Then Cells(x, 4) = Date
End If
End Sub