Gruppe
Dialog
Problem
Wie kann ich die Eingabemöglichkeit in einer UserForm-TextBox auf Buchstaben begrenzen?
ClassModule: frmBuchstaben
Private Sub cmdContinue_Click()
Unload Me
End Sub
Private Sub txtChars_Change()
Dim sTxt As String
If txtChars.Text = "" Then Exit Sub
sTxt = txtChars.Text
If Not Right(sTxt, 1) Like "[a-z]" And Not _
Right(sTxt, 1) Like "[A-Z]" Then
sTxt = Left(sTxt, Len(sTxt) - 1)
txtChars.Text = sTxt
End If
End Sub
StandardModule: basMain
Sub CallForm()
frmBuchstaben.Show
End Sub