|
-
Nov 24th, 1999, 09:06 PM
#1
Thread Starter
New Member
How can I know if the text of a mask edit box has no letters in it? (I just want numbers) A mask doesn't work because I want numbers with 2 decimals and it's not a good thing to put a mask like 9999999.99 (if you know what I mean. The data entry is not practical, you can't type the . anywhere like in, say, Fox)
Thanks!!
-
Nov 24th, 1999, 09:18 PM
#2
Fanatic Member
if MaskEdBox doesn't make any sense to you why won't you use TextBox????
If it works for you here is the code to not allow letter:
Code:
Private Sub Text1_KeyPress(KeyAscii As Integer)
If Not IsNumeric(Chr(KeyAscii)) And Chr(KeyAscii) <> "." Then
KeyAscii = 0
End If
End Sub
Hope this will help
------------------
Visual Basic Programmer (at least I want to be one)
------------------
PolComSoft
You will hear a lot about it.
-
Nov 25th, 1999, 03:36 AM
#3
_______
MaskEdit1.Mask = "######.##"
or however many.
ie..# for numbers
? for alphaa
A mask will not allow anything but what is maksked.
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
|