30-06-15, 07:33 AM
Private Sub Text1_KeyPress(KeyAscii As Integer)
If KeyAscii > 31 Then
If (KeyAscii < 48) Or (KeyAscii > 57) Then
KeyAscii = 0
MsgBox "ÇáÑÌÇÁ ßÊÇÈÉ ÃÑÞÇã ÝÞØ", vbInformation, "ÑÓÇáÉ"
End If
End If
End Sub
هذا فيما يخص كتابة رقم فقط
If KeyAscii > 31 Then
If (KeyAscii < 48) Or (KeyAscii > 57) Then
KeyAscii = 0
MsgBox "ÇáÑÌÇÁ ßÊÇÈÉ ÃÑÞÇã ÝÞØ", vbInformation, "ÑÓÇáÉ"
End If
End If
End Sub
هذا فيما يخص كتابة رقم فقط

