Suppose I have a Textbox which I want to accept only integers, and give error otherwise. Is there a built in function that lets you set the textbox data type?
Private Sub Text1_KeyPress(KeyAscii As Integer)
Select Case KeyAscii
Case 8, 46, 48 To 57 'backspace, dec point & numbers only
Exit Sub
Case Else
KeyAscii = 0
Beep
End Select
End Sub