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

كيفية طباعة جميع الخيارات في قائمة منسدلة في إكسيل؟

هل سبق لك أن حاولت طباعة جميع الخيارات في قائمة منسدلة في ورقة عمل Excel؟ تتحدث هذه المقالة عن طباعة جميع الخيارات الموجودة في قائمة منسدلة في نسخة مطبوعة منفصلة في Excel.

اطبع جميع الخيارات في القائمة المنسدلة برمز VBA


اطبع جميع الخيارات في القائمة المنسدلة برمز VBA

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

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

2. في ال ميكروسوفت فيسوال باسيك للتطبيقات نافذة ، الرجاء الضغط إدراج > وحدة. ثم انسخ كود فبا التالي في نافذة الوحدة النمطية. انظر لقطة الشاشة:

كود فبا: اطبع جميع الخيارات في قائمة منسدلة محددة في نسخة مطبوعة منفصلة

Sub Iterate_Through_data_Validation()
    Dim xRg As Range
    Dim xCell As Range
    Dim xRgVList As Range
    Set xRg = Worksheets("Sheet1").Range("B8")
    Set xRgVList = Evaluate(xRg.Validation.Formula1)
    For Each xCell In xRgVList
        xRg = xCell.Value
        ActiveSheet.PrintOut
    Next
End Sub

ملاحظات: في الكود، Sheet1 هو اسم ورقة العمل التي تحتوي على القائمة المنسدلة التي تريد طباعتها. وB8 هي الخلية التي تحتوي على القائمة المنسدلة. يرجى استبدالها بما تحتاجه.

3. اضغط على F5 مفتاح لتشغيل الكود.

ثم تتم طباعة جميع الخيارات الموجودة في القائمة المنسدلة المحددة في ورقة عمل معينة بشكل منفصل.


طباعة الصفحات المحددة بسهولة في ورقة العمل الحالية في 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 (15)
No ratings yet. Be the first to rate!
This comment was minimized by the moderator on the site
I am using the code above which is work great.  Now I need to get it to use the cell reference as the file name when it saves.  How do I do that?
This comment was minimized by the moderator on the site
kalo ingin mencetak sebagian data di drop list, gimana caranya mas ?
terima kasih
This comment was minimized by the moderator on the site
Thanks i used the first option it s amazing but i need to add to it that if there is a blank cell it should not print that option
This comment was minimized by the moderator on the site
Hello MichHave you found the VBA code for print all options in drop down list excluding the empty cell so as you can help is too.
This comment was minimized by the moderator on the site
Hi,The following VBA code helps to print all options in a specific drop-down list excluding the empty items. Hope I can help.<div data-tag="code">Sub Iterate_Through_data_Validation_NULL()
'Updated by Extendoffice 20211231
On Error Resume Next
Dim xRg As Range
Dim xCell As Range
Dim xRgVList As Range
Dim xNum, xF As Integer
xNum = 2
Set xRg = Worksheets("Sheet1").Range("B17")
Set xRgVList = Evaluate(xRg.Validation.Formula1)
xF = 1
For Each xCell In xRgVList
xRg = xCell.Value
If Trim(xCell.Value) = "" Then
Else
'ActiveSheet.PrintPreview
ActiveSheet.PrintOut
End If
Next
End Sub
This comment was minimized by the moderator on the site
Thanks i used the first option it s amazing but i need to add to it that if there is a blank cell it should not print that option
This comment was minimized by the moderator on the site
Hi,
The following VBA code helps to print all options in a specific drop-down list excluding the empty items. Hope I can help.
<div data-tag="code">Sub Iterate_Through_data_Validation_NULL()
'Updated by Extendoffice 20211231
On Error Resume Next
Dim xRg As Range
Dim xCell As Range
Dim xRgVList As Range
Dim xNum, xF As Integer
xNum = 2
Set xRg = Worksheets("Sheet1").Range("B17")
Set xRgVList = Evaluate(xRg.Validation.Formula1)
xF = 1
For Each xCell In xRgVList
xRg = xCell.Value
If Trim(xCell.Value) = "" Then
Else
'ActiveSheet.PrintPreview
ActiveSheet.PrintOut
End If
Next
End Sub
This comment was minimized by the moderator on the site
Hi is there a way to be able to preview first all the possible printouts in my drop-down list before it actually prints?
This comment was minimized by the moderator on the site
Hi Zack,The following VBA code helps to have a print preview before printing. After running the code, the print preview of a drop-down item pops up, you need to manually close the print preview to get the option to print out. <div data-tag="code">Sub Iterate_Through_data_Validation_NULL()
'Updated by Extendoffice 20211231
On Error Resume Next
Dim xRg As Range
Dim xCell As Range
Dim xRgVList As Range
Dim xNum, xF As Integer
xNum = 2
Set xRg = Worksheets("Sheet1").Range("B17")
Set xRgVList = Evaluate(xRg.Validation.Formula1)
xF = 1
For Each xCell In xRgVList
xRg = xCell.Value
If Trim(xCell.Value) = "" Then
Else
ActiveSheet.PrintPreview
ActiveSheet.PrintOut
End If
Next
End Sub
This comment was minimized by the moderator on the site
How can i select a specific droplist, i want to print? , For example if i have 200 names on my droplist and i want to print a specific list, maybe 50 out of 200, How will i do this please?
This comment was minimized by the moderator on the site
Hi,The VBA code below can help you achieve it. Please specify the number of items you want to print in the line "xNum = 10", and the first n options in the drop-down list will be printed out.<div data-tag="code">Sub Iterate_Through_data_Validation_Num1()
'Updated by Extendoffice 20211231
On Error Resume Next
Dim xRg As Range
Dim xCell As Range
Dim xRgVList As Range
Dim xNum, xF As Integer
xNum = 10 'the number of items you want to print
Set xRg = Worksheets("Sheet1").Range("B17")
Set xRgVList = Evaluate(xRg.Validation.Formula1)
xF = 1
For Each xCell In xRgVList
xRg = xCell.Value
'ActiveSheet.PrintPreview '??
ActiveSheet.PrintOut '??
If xF = xNum Then
Exit For
End If
xF = xF + 1
Next
End Sub
This comment was minimized by the moderator on the site
Thanks for the code. But I'm experiencing a minor issue when printing. When I tried to print the sheet with the drop down list. The first print out, prints the first item on the list while the next print out prints a blank data before it prints the second item from the list. What should I do?
This comment was minimized by the moderator on the site
Hi Cloud,
What version of Excel are you using?
The problem can't be reproduced in my case. Sorry for the inconvenience.
This comment was minimized by the moderator on the site
Sorry I totally forgot about this. I'm using Excel 2013.

So it wasn't actually a blank data.

I have this dynamic drop down list in cell R17 which also populates other cells in the worksheet using VLOOKUP Function. What happens during print out is that the odd-positioned items on the list appears on the cell while the even-positioned items seemed not to show up that's why I thought it's printing blank pages.

Thanks!
This comment was minimized by the moderator on the site
Thank you for the post, this has helped me a lot. I was wondering if you had a way to do VBA to print Page 1 based on one drop-down selection and print Page 1 and 2 based on another drop-down selection? Thanks for any help you can provide.
There are no comments posted here yet
Please leave your comments in English
Posting as Guest
×
Rate this post:
0   Characters
Suggested Locations