spät aber dennoch allen ein gesundes neues Jahr.
Zu Frage 1:
Bislang nutzte folgendes Change Ereignis einer TextBox :
If Len(TextBox11.Text) = 4 Then
TextBox11 = Format(Left(TextBox11, 2) & ":" & Right(TextBox11, 2), "hh:mm")
End If
If TextBox11 = Format(Left(TextBox11, 2) & ":" & Right(TextBox11, 2), "hh:mm") Then
With TextBox7
.SetFocus
.SelStart = 0
.SelLength = 4
End With
End If
Nun wollte ich mit meinem primitiven Wissen den Code so ändern:
If Len(TextBox11.Text) = 6 Then
TextBox11 = Format(Left(TextBox11, 2) & ":" & Mid (TextBox11) & ":" & Right(TextBox11, 2), "hh:mm:ss")
End If
If TextBox11 = Format(Left(TextBox11, 2) & ":" & Mid (TextBox11) & ":" & Right(TextBox11, 2), "hh:mm:ss") Then
With TextBox7
.SetFocus
.SelStart = 0
.SelLength = 4
End With
End If
Also mein Ziel ist es, dass bei Eingabe von 025717 als Ergebnis in der TextBox 02:57:17 steht.
Frage 2:
In TextBox6 steht bspw. Helene Fischer - Die Arenatournee
Nun möchte ich, dass in TextBox56, wenn ich TextBox96 verlasse nur Helene Fischer steht.
Mein Code:
tmp = Split(TextBox6, "-")
If TextBox6 = "" Then TextBox6 = tmp(UBound(tmp) - 1)
tmp = tmp(UBound(tmp))
TextBox56 = Split(tmp, ".")(0)
Das funktionier leider nicht mit dem Wert vor dem Bindestrich, sondern umgekehrt. Also in TextBox56 erscheint "Die Arenatournee".
Ich hoffe ich konnte es einigermaßen erklären und vielleicht weiß jemand Rat. Danke dafür.
L.G. Frank H.