Gruppe
Dialog
Problem
Wie kann ich Excel veranlassen, in einem Textfeld in einer UserForm nur numerische Eingaben zuzulassen?
ClassModule: Tabelle1
Private Sub CommandButton1_Click()
frmNurZahlen.Show
End Sub
StandardModule: basMain
Sub CallForm()
frmNurZahlen.Show
End Sub
ClassModule: frmNurZahlen
Private Sub cmdContinue_Click()
Unload Me
End Sub
Private Sub txtNumber_Change()
Dim sTxt As String
sTxt = txtNumber.Text
If sTxt = "" Then Exit Sub
If Right(sTxt, 1) Like "[0-9]" = False Then
txtNumber.Text = Left(sTxt, Len(sTxt) - 1)
End If
End Sub