am using this code to prevent from entering letters in the numeric fields
//////////////////////////////
Private Sub txtPhone_KeyPress(KeyAscii As Integer)
If KeyAscii <> 8 Then
If Not IsNumeric(Chr(KeyAscii)) Then
KeyAscii = 0
MsgBox ("Only Numbers allowed"
End If
End If
End Sub
///////////////////
because this code in the keypress event .. if i copied and pasted letters in this field it will accept it !!
so what shall i do ?
//////////////////////////////
Private Sub txtPhone_KeyPress(KeyAscii As Integer)
If KeyAscii <> 8 Then
If Not IsNumeric(Chr(KeyAscii)) Then
KeyAscii = 0
MsgBox ("Only Numbers allowed"
End If
End If
End Sub
///////////////////
because this code in the keypress event .. if i copied and pasted letters in this field it will accept it !!
so what shall i do ?