Private Sub TxtNotiz_KeyDown(ByVal KeyCode As MSForms.ReturnInteger, ByVal Shift As Integer)
' Die Variable aks beginnt bei der ersten Eingabe mit 0....
' sie wird bei Opt5 auf Null gesetzt
If KeyCode = 13 Then
If Opt5.Value = False Then
' Der Bereich ist für Einzeleingaben
Else
If aks = 0 Then Sheets("Eingabe").Txt11.Value = TxtNotiz.Value
If aks = 1 Then Sheets("Eingabe").Txt12.Value = TxtNotiz.Value
If aks = 2 Then Sheets("Eingabe").Txt13.Value = TxtNotiz.Value
If aks = 3 Then Sheets("Eingabe").Txt21.Value = TxtNotiz.Value
If aks = 4 Then Sheets("Eingabe").Txt22.Value = TxtNotiz.Value
If aks = 5 Then Sheets("Eingabe").Txt23.Value = TxtNotiz.Value
If aks = 6 Then Sheets("Eingabe").Txt31.Value = TxtNotiz.Value
If aks = 7 Then Sheets("Eingabe").Txt32.Value = TxtNotiz.Value
If aks = 8 Then Sheets("Eingabe").Txt33.Value = TxtNotiz.Value
If aks = 9 Then Sheets("Eingabe").Txt41.Value = TxtNotiz.Value
If aks = 10 Then Sheets("Eingabe").Txt42.Value = TxtNotiz.Value
If aks = 11 Then Sheets("Eingabe").Txt43.Value = TxtNotiz.Value
'If TxtNotiz.Value = "" Then Opt5.Value = False
aks = aks + 1
If aks = 12 Then Sheets("Eingabe").TxtNotiz.Enabled = False
If aks = 1 Then Frame3.Caption = "Zweite Zeile für Pos 1"
If aks = 2 Then Frame3.Caption = "Dritte Zeile für Pos 1"
If aks = 3 Then Frame3.Caption = "Erste Zeile für Pos 2"
If aks = 4 Then Frame3.Caption = "Zweite Zeile für Pos 2"
If aks = 5 Then Frame3.Caption = "Dritte Zeile für Pos 2"
If aks = 6 Then Frame3.Caption = "Erste Zeile für Pos 3"
If aks = 7 Then Frame3.Caption = "Zweite Zeile für Pos 3"
If aks = 8 Then Frame3.Caption = "Dritte Zeile für Pos 3"
If aks = 9 Then Frame3.Caption = "Erste Zeile für Pos 4"
If aks = 10 Then Frame3.Caption = "Zweite Zeile für Pos 4"
If aks = 11 Then Frame3.Caption = "Dritte Zeile für Pos 4"
'----------- ab Hier soll Focus wieder auf's Textfeld--------
TxtNotiz.Text = ""
TxtNotiz.SetFocus
End If
End If
Sheets("Eingabe").Protect
End Sub
UserForm Textfeldeingabe begrenzen
enibas74 14.07.2007 - 28 Hits - 1 Antwort
Excel benutzen, trotz offener Userform
BlauLED 22.10.2007 - 162 Hits - 1 Antwort
Textfeld VBA
ro05 14.04.2008 - 33 Hits - 1 Antwort
UserForm ComboBox
fedjo 26.04.2008 - 42 Hits - 3 Antworten
UserForm ListBox
fedjo 15.06.2008 - 166 Hits - 8 Antworten