here:

VB Code:
  1. Private Sub TextBox1_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TextBox1.TextChanged
  2.         TextBox1.Text = filterText(TextBox1.Text)
  3.     End Sub
  4.  
  5.     Private Function filterText(ByVal txt As String) As String
  6.         If txt Is Nothing Then Return Nothing
  7.  
  8.         Const numbers As String = "1234567890"
  9.         Dim filtered As String = ""
  10.         Dim i As Integer
  11.         Dim aChar As String
  12.  
  13.  
  14.         For i = 0 To txt.Length - 1
  15.             aChar = txt.Substring(i, 1)
  16.  
  17.             ' See if this character is a number
  18.             If numbers.IndexOf(aChar) <> -1 Then
  19.                 filtered &= aChar
  20.             End If
  21.         Next
  22.  
  23.         Return filtered
  24.     End Function