bonjour, je reviens vers vous afin d'éviter les doublons, en effet j'aimerais que lorsque je rentre une entree en "B"(numero de clefs), elle puisse se faire que si le mm numéro présent dans la colonne "B" a eu un retour en colonne "E" pour eviter les erreurs d'enregistrement.
je ne sais pas si c'est tres clair.
je vous met mon code
Option Explicit
If Len(TextBox2) = 0 Then
MsgBox "saisie incomplète"
TextBox2.SetFocus: Exit Sub
End If
If Len(TextBox3) = 0 Then
MsgBox "saisie incomplète"
TextBox3.SetFocus: Exit Sub
End If
If Len(TextBox4) = 0 Then
MsgBox "saisie incomplète"
TextBox4.SetFocus: Exit Sub
End If
Rows("2:2").Select
Selection.Insert Shift:=xlDown, CopyOrigin:=xlFormatFromLeftOrAbove
Unload UserForm1
End Sub
Private Sub Label1_Click()
End Sub
Private Sub TextBox1_Change()
[A2] = TextBox1
End Sub
Private Sub TextBox2_Change()
[B2] = TextBox2
End Sub
Private Sub TextBox3_Change()
[C2] = TextBox3
End Sub
Private Sub TextBox4_Change()
[D2] = TextBox4
End Sub
Private Sub UserForm_Click()
End Sub
Private Sub UserForm_Initialize()
TextBox1.Value = Format(Now(), "mm/dd/yyyy-hh:mm")
UserForm1.TextBox2.SetFocus
End Sub