اذهب الي المحتوي
أوفيسنا

الردود الموصى بها

قام بنشر

السلام عليكم  ارجو من الخبراء  تعديل هذا الكود ان امكن.... وظيفه نسخ  محتوى الخلية عند نقر عليها....ارجو تعديله  ليقوم  بكتابة  الرقم اللاحق  عند النقر المزدوج على خلية اخرى  تكون في  نفس  العمود ان امكن

 Public selectedCell As String 'Sheet Variable
Public lastCell As String

' This updates the Sheet variable with the most recent selection
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
    selectedCell = lastCell
    lastCell = Target.Address
End Sub

' Added a check for having a previously selected cell
Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean)
    If Not Intersect(Target, Range("A1:c100")) Is Nothing Then
        If selectedCell = vbNullString Then
            Cancel = True
            MsgBox "Please select a destination cell for the data."
            selectedCell = vbNullString
            lastCell = vbNullString 'Prevents overwriting same cell by accident
        Else
            Cancel = True
            Target.Copy Destination:=Range(selectedCell)
            selectedCell = vbNullString
            lastCell = vbNullString 'Prevents overwriting same cell by accident
        End If
    End If
End Sub

المصنف1.xlsm

انشئ حساب جديد او قم بتسجيل دخولك لتتمكن من اضافه تعليق جديد

يجب ان تكون عضوا لدينا لتتمكن من التعليق

انشئ حساب جديد

سجل حسابك الجديد لدينا في الموقع بمنتهي السهوله .

سجل حساب جديد

تسجيل دخول

هل تمتلك حساب بالفعل ؟ سجل دخولك من هنا.

سجل دخولك الان
  • تصفح هذا الموضوع مؤخراً   0 اعضاء متواجدين الان

    • لايوجد اعضاء مسجلون يتصفحون هذه الصفحه
×
×
  • اضف...

Important Information