الأخ الحبيب حسام اسمح لي بإضافة بسيطة على الكود الخاص بك
Private Sub Worksheet_Change(ByVal Target As Range)
If Not Intersect(Target, Range("C8:C9")) Is Nothing Then
If [C3] = 1 And Not IsEmpty(Target) Then MsgBox "لا يمكن ادخال كميات أسفلتيه فى الحفرية الترابية": Target.ClearContents
End If
If Not Intersect(Target, Range("E7:E8")) Is Nothing Then
If [C3] = 1 And Not IsEmpty(Target) Then MsgBox "لا يمكن ادخال كميات أسفلتيه فى الحفرية الترابية": Target.ClearContents
End If
End Sub
حتى يتم مسح محتويات الخلية بعد إظهار الرسالة