bonjour, j 'ai un soucis, comme tout le monde je pense mais bon.
voilà quand je scanne dans mon userform les données rentre bien sur mon textbox2
mais apres ca passe automatiquement sur mon textbox4 sans passer par le textbox3. je vous mets mon code
Private Sub CommandButton1_Click()
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
comment fixer le curseur sur le textbox3