Private Sub TextBox1_Change()
Dim iPos As Integer
If TextBox1.Value = "" Then
TextBox1.SetFocus
Else
i = Format(i, "#############")
i = TextBox1.Value
Call Beep(1000, 100)
ListBox1.AddItem i
' verif
iPos = 0
If ListBox1.ListCount < 1 Then Exit Sub
Do While iPos < ListBox1.ListCount
ListBox1.Text = ListBox1.List(iPos)
If ListBox1.ListIndex <> iPos Then
ListBox1.RemoveItem iPos
Call Beep(500, 800)
MsgBox "Vous avez déjà scanner le code" & " " & i & " " & "!", vbCritical, "Message du système"
Else
iPos = iPos + 1
End If
Loop
End If
End Sub