I found this code for making my textbox only accept numbers.
Private Sub TextBox1_KeyPress(ByVal sender As System.Object, ByVal e As System.Windows.Forms.Key
You also need to handle pasted text (there may not be a keypress). The best way to do this is with a MaskedTextBox.