Limit the entry of the keyboard, private sub txthandset_keypress (keyascii as integer) Keyasciiiii = isvalidtext (Keyascii, "-0123456789." TRUE) End Sub
Public Function isValidText (KeyIn As Integer, ValidateString As String, Editable As Boolean) As Integer 'dml add Dim ValidateList As String Dim KeyOut As Integer If Editable = True Then ValidateList = UCase (ValidateString) & Chr (8) Else ValidateList = UCase ( Validatestring) Endiffate, 1, Validatelist, ucase (Chr (Keyin)), 1)> 0 Then Keyout = Keyin Else Keyout = 0 Beep End IF ISVALIDTEXT = KEYOUTEND FUNCTION