Use these functions in KeyPress events to format user entries as entry is typed. UCaseKeyPress() converts key pressed to uppercase while LCaseKeyPress() converts key pressed to lowercase.
Inputs
KeyAscii As Integer
The ASCII value of key pressed; parameter from KeyPress event.
Assumes
These two functions are easily re-usable in any projects where form controls with KeyPress events exists. You may also use this function in situations where the equivalent upper or lower case ASCII value of a character is to be evaluated.
Returns
Returns the new value of KeyASCII to be returned by the KeyPress event.