What we endup doing is to write a lot of validation methods (for
decimal, negative decimal, floating, negative floating, literal etc)
and put them in a bas module, so we do not have duplicate code,
and we call those method in the keypress event (as a plus, you
can also do a range validation...)
The code is similar to the one already suggested in this thread,
plus dealing with cut and paste. That is, allowing to press Ctrl+C
and Ctrl+V and check the text after a paste.
Marco
> Hi,
How can i stop user entering some keys, like
allowing numeric-only characters for some field?
I tracked it with isnumeric function in change
event, but it allows user to enter the character "e"
and "d" in the middle of the number. You know what i
mean...