Text box prevents illegal characters from entering:
Enter an integer: private sub text1_keypress (Keyascii As Integer) Select Case Keyascii Case ASC ("0") To ASC ("9"), VBKEYBACK 'NOPCase Else Keyascii = 0nd SelectensEnd Sub
Only enter the decimal:
Private sub text1_keypress (Keyascii As INTEGER) SELECT CASE Keyascialase ASC ("0") To ASC ("9"), VBKEYBACK 'NOP
Case ASC (".") 'Allows a decimal point if INSTR (1, Text1.Text, ".")> 0 THEN Keyascii = 0
Case else keyascii = 0
End SelectenD Sub