انتقل إلى المحتوى الرئيسي

كيفية إضافة علامة اختيار في خلية بالنقر المزدوج في إكسيل؟

عادةً ، لإدراج علامة اختيار في خلية ، تحتاج إلى الدخول إلى مربع الحوار Symbol ، والعثور على رمز علامة الاختيار وإدخاله يدويًا. لكن ليس من السهل العثور على رمز علامة الاختيار في مربع الحوار Symbol نظرًا لوجود العديد من الرموز المدرجة بالداخل. كيفية إضافة علامة اختيار بسرعة في خلية في إكسيل؟ ستوضح لك هذه المقالة طريقة VBA لإضافة علامة اختيار بسهولة في خلية بالنقر المزدوج فقط.

انقر نقرًا مزدوجًا لإضافة علامة اختيار في خلية برمز VBA


انقر نقرًا مزدوجًا لإضافة علامة اختيار في خلية برمز VBA

يمكن أن تساعدك التعليمات البرمجية لـ VBA التالية في إضافة علامة اختيار في خلية بالنقر المزدوج. الرجاء القيام بما يلي.

1. افتح ورقة العمل التي تحتاجها لإضافة علامة اختيار في الخلية ، ثم انقر بزر الماوس الأيمن واختر عرض الرمز من قائمة النقر بزر الماوس الأيمن.

2. في ال ميكروسوفت فيسوال باسيك للتطبيقات نافذة ، انسخ والصق رمز VBA أدناه في ملف رمز نافذة.

رمز فبا: انقر نقرًا مزدوجًا لإضافة علامة اختيار في خلية

Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean)
    If Not Intersect(Target, Range("B1:B10")) Is Nothing Then
        Application.EnableEvents = False
        If ActiveCell.Value = ChrW(&H2713) Then
            ActiveCell.ClearContents
        Else
            ActiveCell.Value = ChrW(&H2713)
        End If
        Cancel = True
    End If
    Application.EnableEvents = True
End Sub

ملاحظات: في الكود ، B1: B10 هو النطاق الذي ستضيف إليه علامة الاختيار بالنقر المزدوج. يرجى تغييره بناءً على حاجتك.

3. اضغط على قديم + Q مفاتيح لإغلاق ميكروسوفت فيسوال باسيك للتطبيقات نافذة والعودة إلى ورقة العمل.

الآن ، انقر نقرًا مزدوجًا فوق أي خلية في النطاق B1: B10 ، سيتم إدخال علامة الاختيار تلقائيًا. والنقر المزدوج فوق الخلية مرة أخرى ، ستتم إزالة علامة الاختيار المدرجة.

إذا كنت بحاجة إلى استخدام علامات الاختيار بشكل متكرر في عملك اليومي في Excel ، فإني أوصي هنا باستخدام النص السيارات فائدة كوتولس ل إكسيل. باستخدام هذه الميزة ، يمكنك حفظ علامة الاختيار كإدخال نص تلقائي ، ثم إعادة عرضها في المستقبل بنقرة واحدة فقط في Excel كما هو موضح في العرض التوضيحي أدناه.
قم بتنزيله وجربه الآن! (تجربة مجانية لمدة 30 يومًا)


مقالات ذات صلة:

أفضل أدوات إنتاجية المكتب

🤖 مساعد Kutools AI: إحداث ثورة في تحليل البيانات على أساس: التنفيذ الذكي   |  إنشاء التعليمات البرمجية  |  إنشاء صيغ مخصصة  |  تحليل البيانات وإنشاء الرسوم البيانية  |  استدعاء وظائف Kutools...
الميزات الشعبية: البحث عن التكرارات أو تمييزها أو تحديدها   |  حذف الصفوف الفارغة   |  دمج الأعمدة أو الخلايا دون فقدان البيانات   |   جولة بدون صيغة 
سوبر بحث: معايير متعددة VLookup    VLookup ذات القيمة المتعددة  |   VLookup عبر أوراق متعددة   |   بحث غامض ....
قائمة منسدلة متقدمة: إنشاء القائمة المنسدلة بسرعة   |  القائمة المنسدلة التابعة   |  قائمة منسدلة متعددة التحديد ....
مدير العمود: إضافة عدد محدد من الأعمدة  |  نقل الأعمدة  |  تبديل حالة رؤية الأعمدة المخفية  |  مقارنة النطاقات والأعمدة 
الميزات المميزة: التركيز على الشبكة   |  عرض تصميم   |   شريط الفورمولا الكبير    مدير المصنفات والأوراق   |  مكتبة الموارد (النص السيارات)   |  منتقي التاريخ   |  اجمع أوراق العمل   |  تشفير/فك تشفير الخلايا    إرسال رسائل البريد الإلكتروني عن طريق القائمة   |  سوبر تصفية   |   مرشح خاص (تصفية غامق / مائل / يتوسطه خط ...) ...
أفضل 15 مجموعة أدوات12 نص الأدوات (إضافة نص, إزالة الأحرف، ...)   |   +50 رسم الأنواع (مخطط جانت، ...)   |   40+ عملي الصيغ (احسب العمر على أساس تاريخ الميلاد، ...)   |   19 إدخال الأدوات (أدخل رمز الاستجابة السريعة, إدراج صورة من المسار، ...)   |   12 تحويل الأدوات (أرقام إلى كلمات, نتيجة تحويل عملة، ...)   |   7 دمج وتقسيم الأدوات (الجمع بين الصفوف المتقدمة, تقسيم الخلايا، ...)   |   ... و اكثر

عزز مهاراتك في Excel باستخدام Kutools for Excel، واختبر كفاءة لم يسبق لها مثيل. يقدم Kutools for Excel أكثر من 300 ميزة متقدمة لتعزيز الإنتاجية وتوفير الوقت.  انقر هنا للحصول على الميزة التي تحتاجها أكثر...

الوصف


يجلب Office Tab الواجهة المبوبة إلى Office ، ويجعل عملك أسهل بكثير

  • تمكين التحرير والقراءة المبوبة في Word و Excel و PowerPointوالناشر والوصول و Visio والمشروع.
  • فتح وإنشاء مستندات متعددة في علامات تبويب جديدة من نفس النافذة ، بدلاً من النوافذ الجديدة.
  • يزيد من إنتاجيتك بنسبة 50٪ ، ويقلل مئات النقرات بالماوس كل يوم!
Comments (13)
Rated 5 out of 5 · 1 ratings
This comment was minimized by the moderator on the site
hello bro, is it possible to add an icon?
for example double-click the first checklist icon ,and if you double click the second cross icon appears ,and double click the last to go blank .
Rated 5 out of 5
This comment was minimized by the moderator on the site
Bonjour,

Une fois ces cases cochées, j'aimerais qu'une cellule x m'additionne les chiffres d'une certaine colonne, est ce possible ?

Merci à vous, bonne soirée
This comment was minimized by the moderator on the site
How do I make it so that it adds a time stamp on the adjacent cell after the double click?
This comment was minimized by the moderator on the site
Hi Sora,
The following VBA code can do you a favor. Please give it a try. Thank you.
Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean)
'Updated by Extendoffice 20221125
    Dim xRight As Range
    Dim KeyCells As Range
    Set KeyCells = Range("B1:B10")
    Set xRight = Target.Offset(0, 1)
    If Not Application.Intersect(KeyCells, Range(Target.Address)) Is Nothing Then
        xRight.Value = Now()
    End If
Application.EnableEvents = True
End Sub
This comment was minimized by the moderator on the site
Eu gostaria de saber se é possível adicionar a marca com apenas um clique ao invés de dois.
This comment was minimized by the moderator on the site
Hi Ulisses Nonato,
If you want to add a check mark to a cell with only one mouse click, the following VBA code can do you a favor.
You need to click the right mouse button to activate the code.
Private Sub Worksheet_BeforeRightClick(ByVal Target As Range, Cancel As Boolean)
    'Updated by Extendoffice 20220714
    If Not Intersect(Target, Range("B1:B10")) Is Nothing Then
        Application.EnableEvents = False
        If ActiveCell.Value = ChrW(&H2713) Then
            ActiveCell.ClearContents
        Else
            ActiveCell.Value = ChrW(&H2713)
        End If
        Cancel = True
    End If
    Application.EnableEvents = True
End Sub
This comment was minimized by the moderator on the site
How do i repeat this for multiple columns? 
For example i need it in the following:
E, F, I, J, M, N ,Q, R, U, V, Y, Z, AC, AD, AG, AH, AK, AL, AO, AP, AS, AT, AW, AX
This comment was minimized by the moderator on the site
Hi crystal
is there a way to have checkmarks in A1:A10 along with B3:B10?
This comment was minimized by the moderator on the site
Hi there! What would I add to the above code to get the cell to change color when the check box is added?
This comment was minimized by the moderator on the site
Is there a way to loop this code so that it is on a lot of worksheets in one workbook?
This comment was minimized by the moderator on the site
Hi leoflute,After pressing the Alt + F11 keys to open the Microsoft Visual Basic for Applications window, please double click ThisWorkbook to open the ThisWorkbook(Code) window, and then copy the below code into the code window. Don't forget to change the sheet names and the cell range in the code.<div data-tag="code">Private Sub Workbook_SheetBeforeDoubleClick(ByVal Sh As Object, ByVal Target As Range, Cancel As Boolean)
'Updated by Extendoffice 20201012
Dim xStrRg, xStrWs, xStrWsName As String
Dim xEEBol, xWSNBol, xBol As Boolean
Dim xArrWs
Dim xArrRg
Dim xI, xJ As Integer
Dim xWs As Worksheet
Dim xRg As Range

xStrWs = "Sheet5,Sheet1,Sheet2" 'The specific worksheet names
xStrRg = "B3:B10" 'The range of cells you will insert check marks
xArrWs = Split(xStrWs, ",")
xArrRg = Split(xStrRg, ",")

xEEBol = Application.EnableEvents
Application.EnableEvents = False
On Error Resume Next
xStrWsName = Sh.Name
xBol = False
xWSNBol = False
For xI = 0 To UBound(xArrWs)
If xStrWsName = xArrWs(xI) Then
xWSNBol = True
Exit For
End If
Next xI

If xWSNBol Then
Set xWs = Application.Worksheets.Item(xArrWs(xI))
For xJ = 0 To UBound(xArrRg)
Set xRg = Sh.Range(xArrRg(xJ))
If Not Intersect(Target, xRg) Is Nothing Then
xBol = True
Exit For
End If
Next xJ
End If

If xBol Then
If ActiveCell.Value = ChrW(&H2713) Then
ActiveCell.ClearContents
Else
ActiveCell.Value = ChrW(&H2713)
End If
Cancel = True
End If
Application.EnableEvents = xEEBol
End Sub

This comment was minimized by the moderator on the site
como eu faço pra inserir a marca de seleção na célula, porém sem deletar o número que estiver digitado nela ou seja, a marca sairia na frente do número quando eu der duplo clique... e quando eu quizer apagar a marca, eu dou duplo clique novamente e a célula voltaria ao normar (continuaria apenas o número).
This comment was minimized by the moderator on the site
Ola Luiz, tente essa alteracao. Ira funcionar nas celulas A2:A10 e D2:D5, altere conforme sua necessidade.

Tadao


Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean)
If Not Intersect(Target, Union(Range("A2:A10"), Range("D2:D5"))) Is Nothing Then
Application.EnableEvents = False
If Left(ActiveCell.Value, 1) = ChrW(&H2713) Then
ActiveCell.Value = Right(ActiveCell, Len(ActiveCell) - 1)
ActiveCell.HorizontalAlignment = xlRight
Else
ActiveCell.Value = ChrW(&H2713) & ActiveCell.Value
End If
Cancel = True
End If
Application.EnableEvents = True
End Sub
There are no comments posted here yet
Please leave your comments in English
Posting as Guest
×
Rate this post:
0   Characters
Suggested Locations