Are you setting an integer value = 10.0? If so, this will generate an error because an integer will hold only "whole" numbers. If you would like to set a variable = 10.0, declare it as a double.
Try placing conditional statement in the KeyPress event of the text box. If the keyascii value is equal to 39, set it equal to 0. This will throw away the keystroke, thus preventing the user from typing it in.
Inside KeyPress event:
Select case keyascii
Case 39
keyascii = 0
case...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.