Sub txt_tell_TextChanged (Old As String, New As String)
Dim update As Boolean
Try
Dim text As String = Regex.Replace("\D",New,"")
If New <> text Then
update = True
End If
Catch
Log(LastException.Message)
End Try
If text.Length >= 18 Then ' 18 is the max length allowed you can change this :)
text = text.SubString2(0,18)
update = True
End If
If update Then
txt_tell.Text = text
txt_tell.SetSelection(text.Length,text.Length)
End If
End Sub