We can use isnumeric() to find out whether the text in a textbox contains only numbers.
Here is an example:
If IsNumeric(TextBox2.Text) Then
'Logic if the textbox has only numbers Else
'Logic if the textbox contains alphabets or special characters also
End If