hello, i want to make a function which checks if a value is a number or not....
i've got this;

Code:
    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        For i As Integer = 0 To Integer.MaxValue
            If TextBox2.Text = CType(i, String) Then
                GoTo er
                Exit Sub
            Else
                i = 1
                TextBox3.Text = TextBox3.Text.Replace("//Created by Table Viewer v1.0 Beta", " " & ComboBox1.Text & " " & TextBox2.Text & ";" & vbNewLine & "//Created by Table Viewer v1.0 Beta")
                Exit For
            End If
        Next
er:
        MsgBox("The value name can't be an integer!", MsgBoxStyle.Exclamation, "Error")
    End Sub
But when I try it, and insert a number in the textbox it shows the message box but it adds the value to a list too I don't want it to the list