|
-
Mar 26th, 2000, 10:36 PM
#1
Thread Starter
_______
If Not IsNumeric(Chr(KeyAscii)) Then KeyAscii = 13
I am using the above and need to add backspace and decimal to the allowed characters. I'm at work and don'thave msdn to look it up...
Help please...code...chr(ascii) what?
-
Mar 26th, 2000, 11:00 PM
#2
Lively Member
text box called text1....
Private Sub Text1_KeyPress(KeyAscii As Integer)
If KeyAscii = 8 Then Exit Sub ' backspace
If KeyAscii = 46 Then
If InStr(1, Text1.Text, ",") <> 0 Then ' only allow one decimal
KeyAscii = 0
Else
Exit Sub ' decimal
End If
End If
If Not IsNumeric(Chr(KeyAscii)) Then KeyAscii = 0
End Sub
-
Mar 26th, 2000, 11:21 PM
#3
Thread Starter
_______
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|