محمد الورفلي1 قام بنشر نوفمبر 17, 2014 قام بنشر نوفمبر 17, 2014 (معدل) السلام عليكم ممكن دمج كودين في كود واحد Private Sub Worksheet_Change(ByVal Target As Range) If Target.Cells.Count > 1 Then Exit Sub On Error Resume Next If Not Intersect(Target, Range("b1:b60000")) Is Nothing Then VBA.Calendar = vbCalGreg If IsEmpty(Target) Then Target(1, 2).Offset(0, -2).ClearContents Else With Target(1, 7).Offset(0, -2) .Value = Date .EntireColumn.AutoFit End With End If End If End Sub الكود الثاني وهو بنفس الغرض ولكن يعمل من خلية مختلفة Private Sub Worksheet_Change(ByVal Target As Range) If Target.Cells.Count > 1 Then Exit Sub On Error Resume Next If Not Intersect(Target, Range("c1:c60000")) Is Nothing Then VBA.Calendar = vbCalGreg If IsEmpty(Target) Then Target(1, 2).Offset(0, -2).ClearContents Else With Target(1, 7).Offset(0, -2) .Value = Date .EntireColumn.AutoFit End With End If End If End Sub هذا الملف دمج كودين.rar تم تعديل نوفمبر 17, 2014 بواسطه محمد الخازمي
ياسر خليل أبو البراء قام بنشر نوفمبر 17, 2014 قام بنشر نوفمبر 17, 2014 جرب : Private Sub Worksheet_Change(ByVal Target As Range) If Target.Cells.Count > 1 Then Exit Sub On Error Resume Next If Not Intersect(Target, Range("b1:b60000")) Is Nothing Then VBA.Calendar = vbCalGreg If IsEmpty(Target) Then Target(1, 2).Offset(0, -2).ClearContents Else With Target(1, 7).Offset(0, -2) .Value = Date .EntireColumn.AutoFit End With End If End If If Not Intersect(Target, Range("c1:c60000")) Is Nothing Then VBA.Calendar = vbCalGreg If IsEmpty(Target) Then Target(1, 2).Offset(0, -2).ClearContents Else With Target(1, 7).Offset(0, -2) .Value = Date .EntireColumn.AutoFit End With End If End If End Sub
محمد الورفلي1 قام بنشر نوفمبر 17, 2014 الكاتب قام بنشر نوفمبر 17, 2014 احسنت بارك الله فيك وشكراً على المساعدة
ياسر خليل أبو البراء قام بنشر نوفمبر 17, 2014 قام بنشر نوفمبر 17, 2014 الحمد لله الذي بنعمته تتم الصالحات 1
الردود الموصى بها
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.