اذهب الي المحتوي
أوفيسنا
بحث مخصص من جوجل فى أوفيسنا
Custom Search

استخراج الكود


muneef
إذهب إلى أفضل إجابة Solved by Ali Mohamed Ali,

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

السلام عليكم ورحمة الله وبركاته

وجدت ملف فيه خاصية لطالما بحثت عنها ولم أجدها 

وهي الضغط على الخلية دبل كليك لعمل صح 

والمطلوب كيف يمكن تطبيقها في ملف آخر 

ثانيا هل يمكن اضافة خاصية لو ضغط كليك مرة واحدة في الخلية يعمل اكس 

Weekly chore schedule1.xlsm

رابط هذا التعليق
شارك

  • أفضل إجابة

وعليكم السلام يمكن عمل هذا بهذا الكود في حدث الصفحة

وبالنسبة عن كيفية تطبيق هذا بملف اخر فيمكنك دراسة الكود جيدا ونقله وتطويعه في عمل اخر

Private Sub Worksheet_BeforeRightClick(ByVal Target As Range, Cancel As Boolean)
   'Only run the code if the user selected a cell in our defined range:
    If Not Intersect(Target, Me.Range("Table_Schedule")) Is Nothing Then
        'Declare variables
        Dim rInt As Range
        Dim rCell As Range
        Dim rw As Long
        Dim xLoc As Range
        Set rInt = Me.Range(Me.Cells(Target.Row, "d"), Me.Cells(Target.Row, "p"))
        If Not rInt Is Nothing Then
            'Look for a response in our answer range
            Set xLoc = rInt.Find("x ")
            If Not xLoc Is Nothing Then
                'If there was a response and the response was in the same column _
                'we selected, wipe the response and exit the sub.
                If Target.Column = xLoc.Column Then
                    rInt.Value = vbNullString
                    Exit Sub
                'Else, wipe the previous response and add the new response
                Else
                    rInt.Value = vbNullString
                    Target.Value = "x "
                End If
            'If there were no previous responses...
            Else: Target.Value = "x "
            End If
        End If
    End If
End Sub



 

Weekly chore schedule1.xlsm

  • Like 3
رابط هذا التعليق
شارك

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

زائر
اضف رد علي هذا الموضوع....

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

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

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

Important Information