Gruppe
Dialog
Problem
Wie kann ich je nach Eingabe in EditBox 1 den Focus an EditBox2 oder EditBox3 übergeben und dort die Schreibmarke an eine bestimmte Stelle setzen lassen?
StandardModule: basMain
Sub CallForm()
frmSelect.Show
End Sub
ClassModule: frmSelect
Private Sub cmdContinue_Click()
Unload Me
End Sub
Private Sub cmdFirst_Click()
With txtFirst
.SetFocus
.SelStart = 3
.SelLength = 2
End With
End Sub
Private Sub cmdSecond_Click()
With txtSecond
.SetFocus
.SelStart = 6
.SelLength = 4
End With
End Sub
Private Sub UserForm_Initialize()
txtFirst.Text = Format( _
DateSerial(Year(Date), Month(Date), 12), "dd.mm.yyyy")
txtSecond.Text = Format( _
DateSerial(Year(Date), Month(Date), 25), "dd.mm.yyyy")
End Sub