ERFORDERLICHE
OBJEKTE
1 Textbox (Text1)
FORM-CODE
Private Function NurZahlen(KeyAscii As Integer)
Const Nummern$ = "0123456789"
If InStr(Nummern, Chr(KeyAscii)) = 0 Then KeyAscii = 0
NurZahlen = KeyAscii
End Function
Private Sub Form_Load()
Text1.Text = ""
End Sub
Private Sub Text1_KeyPress(KeyAscii As Integer)
KeyAscii = NurZahlen(KeyAscii)
End Sub
|