You dont need to display a message stating that the user has pressed anything other than a numerical digit.
Simply limit the text box to accept numbers only.
Code:Private Sub Text1_KeyPress(KeyAscii As Integer) If KeyAscii < 48 Or KeyAscii > 57 Then KeyAscii = 0 End Sub




Reply With Quote
