26-12-16, 04:39 PM
26-12-16, 11:46 PM
السّلام عليكم و رحمة الله و بركاته
جرّب هكذا مثلاً إن شاء الله تضبط معك ..
إحتراماتي
كود :
Private Sub Text1_Change()
If Not IsNumeric(Text1.Text) Then
MsgBox "الرجاء ، أدخل أرقاماً فقط", vbCritical, "خطأ"
Text1.SelStart = 0
Text1.SelLength = Len(Text1.Text)
Text1.SetFocus
End If
End Sub03-05-17, 01:59 AM
Private Sub Text1_KeyPress(KeyAscii As Integer)
If (KeyAscii < 48 Or KeyAscii > 57) And KeyAscii <> 8 Then
KeyAscii = 0
End If
End Sub
هذا الكون رح يضبط معاك مضمون
If (KeyAscii < 48 Or KeyAscii > 57) And KeyAscii <> 8 Then
KeyAscii = 0
End If
End Sub
هذا الكون رح يضبط معاك مضمون