Public Function CheckTextBox(ByVal textb As TextBox, ByVal key As KeyPressEventArgs, Optional ByRef err As String = "") As Boolean
Select Case Asc(key.KeyChar)
Case 8 To 15
Return True
Case 48 To 57
Return True
Case 127
Return True
Case Else
err = "Illegal characters have been put in!" + vbCrLf + "Please only use numeric characters."
Return False
End Select
End Function