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

كيفية إلغاء تحديد أو إلغاء تحديد جميع مربعات الاختيار مرة واحدة في Excel؟

كيف يمكنك إلغاء تحديد أو إلغاء تحديد جميع مربعات الاختيار المحددة مرة واحدة في ورقة العمل كما هو موضح في لقطة الشاشة التالية؟ في هذا المقال سأتحدث عن بعض الأكواد السريعة لحلها.

doc قم بإلغاء تحديد مربعات الاختيار 1

قم بإلغاء تحديد أو إلغاء تحديد جميع خانات الاختيار المحددة برمز VBA


السهم الأزرق الحق فقاعة قم بإلغاء تحديد أو إلغاء تحديد جميع خانات الاختيار المحددة برمز VBA

قم بإلغاء تحديد أو إلغاء تحديد جميع خانات الاختيار المحددة (عناصر التحكم في النموذج):

إذا كانت خانات الاختيار الخاصة بك عبارة عن عناصر تحكم في النموذج ، فيمكنك إلغاء تحديدها مرة واحدة باستخدام رمز VBA التالي:

1. اضغط باستمرار على ALT + F11 مفاتيح لفتح ميكروسوفت فيسوال باسيك للتطبيقات نافذة.

2. انقر إدراج > وحدة، والصق الكود التالي في ملف وحدة نافذة او شباك.

كود فبا: قم بإلغاء تحديد أو إلغاء تحديد كافة خانات الاختيار المحددة (عناصر تحكم النموذج):

Sub ClearCheckBoxes()
'Updateby Extendoffice
    Dim chkBox As Excel.CheckBox
    Application.ScreenUpdating = False
    For Each chkBox In ActiveSheet.CheckBoxes
            chkBox.Value = xlOff
    Next chkBox
    Application.ScreenUpdating = True
End Sub

3. ثم اضغط F5 مفتاح لتشغيل هذا الرمز ، وتم إلغاء تحديد جميع مربعات الاختيار مرة واحدة في ورقة العمل النشطة.


قم بإلغاء تحديد أو إلغاء تحديد كافة خانات الاختيار المحددة (عناصر تحكم ActiveX):

إذا كانت خانات الاختيار عبارة عن عناصر تحكم ActiveX ، فيرجى تطبيق رمز VBA أدناه:

1. اضغط باستمرار على ALT + F11 مفاتيح لفتح ميكروسوفت فيسوال باسيك للتطبيقات نافذة.

2. انقر إدراج > وحدة، والصق الكود التالي في ملف وحدة نافذة او شباك.

كود فبا: قم بإلغاء تحديد أو إلغاء تحديد كافة خانات الاختيار المحددة (عناصر تحكم ActiveX):

Sub clearcheckbox()
'Updateby Extendoffcie
    Dim c As Object
    For Each c In ActiveSheet.OLEObjects
        If InStr(1, c.Name, "CheckBox") > 0 Then
            c.Object.Value = False
        End If
    Next
End Sub

3. ثم اضغط F5 مفتاح لتشغيل هذا الرمز ، وتم إلغاء تحديد جميع مربعات الاختيار مرة واحدة في ورقة العمل النشطة.


أدخل خانات اختيار متعددة في التحديدات مرة واحدة

كوتولس ل إكسيل's مربعات اختيار إدراج دفعة يمكن أن تساعدك الأداة المساعدة في إدراج مربعات اختيار متعددة بسرعة في وقت واحد. انقر لتنزيل Kutools for Excel!

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

🤖 مساعد 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 (15)
No ratings yet. Be the first to rate!
This comment was minimized by the moderator on the site
Hi!!

Thank you very much, all the codes work very well, it has been extremely useful to me, extraordinary work!

Kind regards
This comment was minimized by the moderator on the site
How would I clear all checkboxes on all worksheets?
This comment was minimized by the moderator on the site
How would clear all checkboxes on all worksheets?
This comment was minimized by the moderator on the site
Hello, Ramon

To clear all the checkboxes accross all sheets, please apply the below codes:
Uncheck all checkboxes from all sheets (Form Controls):
Sub Uncheckallcheckboxes()
    Dim sh As Worksheet
    For Each sh In Sheets
        On Error Resume Next
            sh.CheckBoxes.Value = False
        On Error GoTo 0
    Next sh
End Sub


Uncheck all checkboxes from all sheets (ActiveX Controls):
Sub uncheck_all_ActiveX_checkboxes()
    Dim ws As Worksheet
    Dim xbox As OLEObject
    For Each ws In ThisWorkbook.Worksheets
        For Each xbox In ws.OLEObjects
            ws.OLEObjects(xbox.Name).Object.Value = False
        Next
    Next
End Sub


Please have a try, hope this can help you!
This comment was minimized by the moderator on the site
Hallo,
beim öffnen der datei sollten zwei voneinander abhängige CheckBox1 u. CheckBox2 nicht aktiviert sein

Private Sub CheckBox2_Click()
If CheckBox2 = True Then
CheckBox1 = False
End If
End Sub
Private Sub CheckBox1_Click()
If CheckBox1 = True Then
CheckBox2 = False
End If
End Sub

Danke für eure Hilfe
This comment was minimized by the moderator on the site
Hello, Siegfried
If you want to check one and disable another one, please apply the below code:
Note: The checkbox here you should use the ActiveX Control checkbox.
Private Sub CheckBox2_Click()
If CheckBox2 = True Then
CheckBox1.Enabled = False
Else
CheckBox1.Enabled = True
End If
End Sub
Private Sub CheckBox1_Click()
If CheckBox1 = True Then
CheckBox2.Enabled = False
Else
CheckBox2.Enabled = True
End If
End Sub

Please have a try, hope it can help you!
This comment was minimized by the moderator on the site
Merci beaucoup d'avoir partagé le code pour décocher des éléments "CheckBox", cela m'a sauvé ! :o)En effet, en codant un formulaire de saisie fait dans une feuille, je cherchais à trouver un moyen de décocher les cases (en guise de réinitialisation du formulaire) et je ne trouvais pas (à part avec la méthode "Select" qui est, comme nous le savons tous, à bannir), tout simplement car :=> la propriété ".CheckBoxes" n'existe pas en propriété d'une "Worksheet" !=> l'Objet "CheckBoxes" ne figure pas non plus dans l'explorateur d'objets !C'est lunaire cette histoire...Alors merci énormément.Bien à vous.
This comment was minimized by the moderator on the site
Bonjour Lindas,
Je vous en prie. Heureux que cela aide. Pour toute question, n'hésitez pas à nous contacter. Passe une bonne journée.
Sincèrement,
Mandy
This comment was minimized by the moderator on the site
OMG THANK YOU, THIS WEBSITE IS A LIFE SAVER :)
This comment was minimized by the moderator on the site
Big help! thank you!
This comment was minimized by the moderator on the site
How do i uncheck only the boxes in a specific cell range in the active sheet? I have 3 lists in one sheet (Daily/Weekly/Monthly tasks) and wanted to make a "Clear All" button for each list.
This comment was minimized by the moderator on the site
What if I wanted to use a button to activate the macro to clear the boxes?
This comment was minimized by the moderator on the site
Hi, Ariel,
To use a button to activate the macro, first, you should insert a button from the Shapes drop down list, and then right click the button, choose Assign Macro from the context menu, and then select the macro name in the Assign Macro dialog box. Then click OK, and the macro code will be linked to the button.
Please try, hope it can help you!
This comment was minimized by the moderator on the site
many thanks for this vba code, helped greatly.

FYI for people not getting it to work by hitting F5, simply :

developer tab > macros > select the module just created and click options > type a character for the shortcut, such as ctrl+j or ctrl+k.
This comment was minimized by the moderator on the site
Thanks for your help with this. It is much appreciated. However please note: THE SPELLING IS WRONG IN THE CODE FOR STEP #2. VBA code: Uncheck or deselect all checked checkboxes (ActiveX Controls):
Sub clearcheckbox()
'Updateby Extendoffcie
Dim c As Object
For Each c In ActiveSheet.OLEObjects
If InStr(1, c.Name, "CheckBox") > 0 Then
c.Object.Value = False
End If
Next
End Sub

PLEASE NOTE THE WORD "Extendoffcie" IS NOT SPELLED CORRECTLY. SHOULDN'T IT BE "Extendoffice"?? Anyway, just wanted to put that out there
There are no comments posted here yet
Please leave your comments in English
Posting as Guest
×
Rate this post:
0   Characters
Suggested Locations