Hallo
ich verwende folgende Function in meinem Project.
Public Function GetText(Up As Boolean, t As TextBox) As Long
On Error GoTo fehler
Static Pos As Integer
GetText = -1
If Up Then
Pos = Pos - 1
Else
Pos = Pos + 1
End If
If Pos = -1 Then Pos = UBound(OldText)
If Pos \> UBound(OldText) Then Pos = 0
t.Text = OldText(Pos)
t.SetFocus
t.SelStart = 0
t.SelLength = Len(t.Text)
GetText = 0
Exit Function
fehler:
Exit Function
End Function
Die Function tut fast das was sie sollte. Es wird in der Textbox der geünschte Text eingetragen. Doch dann soll er noch makiert werden und das macht er nicht.
Weiss jemand wo hier der Fehler liegt?
Liebe Gruesse Alex
PS: Rainer auf den anderen Thread melde ich mich nachher noch einmal 😄