ich bekomme in einer Userform von einem Barcode Scanner Werte eingelesen die ich nach einem bestimmten Schema anderen Textboxen (für eine Abfrage) zuweiese, zurzeit habe ich 8 Eingabe Textboxen und 8 weitere in die die Zahlen sortiert übergeben werden.
Ist es Möglich das nach jedem TAB, also Exit die Textbox 1 geleert und als Aktiv gesetzt wird? also das wenn ich Scanne wieder in Textbox 1 der Wert eingetragen wird und durch tab in die Ausgabe Textbox kommt? also sozusagen eine Schleife.
Hatte gedacht irgendwie mit Set Fokus Textbox1 aber klappt nicht.
Kann mir da wer helfen? :) Vielen Dank schonmal!
Private Sub TextBox1_Exit(ByVal Cancel As MSForms.ReturnBoolean)
Dim i As Integer
i = 1
If Controls("TextBox" & i).Value > 8000000000000# Then
TextBox16.Value = Controls("TextBox" & i).Value
ElseIf Controls("TextBox" & i).Value 7000000000000# Then TextBox15.Value = Controls("TextBox" & i).Value
ElseIf Controls("TextBox" & i).Value 6000000000000# Then TextBox14.Value = Controls("TextBox" & i).Value
ElseIf Controls("TextBox" & i).Value 5000000000000# Then TextBox13.Value = Controls("TextBox" & i).Value
ElseIf Controls("TextBox" & i).Value 4000000000000# Then TextBox12.Value = Controls("TextBox" & i).Value
ElseIf Controls("TextBox" & i).Value 3000000000000# Then TextBox11.Value = Controls("TextBox" & i).Value
ElseIf Controls("TextBox" & i).Value 2000000000000# Then TextBox10.Value = Controls("TextBox" & i).Value
ElseIf Controls("TextBox" & i).Value 1000000000000# Then TextBox9.Value = Controls("TextBox" & i).Value
End If
TextBox1.SetFocus
End Sub