by Ian Roberts - GUI Computing
At various times we have been asked about masked input controls. Here is a nice function that you call from the keypress event of your standard text control that will filter out alpha keys, allow only one decimal point, and a specified number of digits, after the decimal point.
Of course, you'd probably want a suite of these functions to handle various mask situations such as logicals (y/n/T/F) or other, application-specific, needs such as an employee number.
I keep a series of these in my TEXT.BAS file and deploy them as needed.
Written by: Ian Roberts