Hi, I try this code to avoid non-numeric entry to a textbox and format it by "#.#0" but it doesn't work..

Private Sub TextBox1_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TextBox1.TextChanged
If Not IsNumeric(TextBox1.Text) Then
SendKeys.Send(vbBack)
End If
TextBox1.Text = Format(TextBox1.Text, "#.#0")
End Sub

What code should I write?