ไปยังเนื้อหาหลัก

วิธีเพิ่มขนาดแบบอักษรรายการแบบเลื่อนลงใน Excel

doc เพิ่มขนาดตัวอักษรรายการแบบเลื่อนลง 1

รายการแบบหล่นลงเป็นคุณลักษณะที่มีประโยชน์มากใน Excel เมื่อคุณสร้างรายการแบบหล่นลงในแผ่นงานของคุณคุณเคยพยายามเพิ่มขนาดตัวอักษรของรายการแบบเลื่อนลงเพื่อให้บันทึกที่เลือกมีขนาดใหญ่ขึ้นและอ่านได้ง่ายขึ้นตามภาพหน้าจอด้านซ้ายหรือไม่? บทความนี้จะพูดถึงวิธีแก้ปัญหาในการแก้ปัญหา

เพิ่มขนาดตัวอักษรของรายการแบบเลื่อนลงด้วยรหัส VBA เพื่อขยายการซูม


เพิ่มขนาดตัวอักษรของรายการแบบเลื่อนลงด้วยรหัส VBA เพื่อขยายการซูม

ในความเป็นจริงไม่มีวิธีโดยตรงที่เราจะเพิ่มขนาดตัวอักษรของรายการแบบเลื่อนลง แต่คุณสามารถใช้รหัส VBA ต่อไปนี้เพื่อเปลี่ยนการตั้งค่าการซูมเซลล์ในรายการแบบเลื่อนลงเพื่อทำให้ข้อความดูใหญ่ขึ้นได้ กรุณาดำเนินการดังนี้:

1. ไปที่เวิร์กชีตที่มีรายการดรอปดาวน์ที่คุณต้องการเพิ่มขนาดฟอนต์

2. คลิกขวาที่แท็บแผ่นงานแล้วเลือก ดูรหัส จากเมนูบริบทในป๊อปอัป Microsoft Visual Basic สำหรับแอปพลิเคชัน โปรดคัดลอกและวางรหัสต่อไปนี้ลงในช่องว่าง โมดูล หน้าต่าง:

รหัส VBA: เพิ่มขนาดตัวอักษรของรายการแบบเลื่อนลงเพื่อขยายการซูมเซลล์

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
'updateby Extendoffice
    On Error GoTo LZoom
    Dim xZoom As Long
    xZoom = 100
    If Target.Validation.Type = xlValidateList Then xZoom = 130
LZoom:
    ActiveWindow.Zoom = xZoom
End Sub

3. จากนั้นบันทึกและปิดรหัสนี้ตอนนี้เมื่อคุณคลิกเซลล์รายการแบบหล่นลงการซูมของเซลล์จะขยายใหญ่ขึ้นและรายการแบบหล่นลงจะปรากฏให้ใหญ่ขึ้น แต่เมื่อคุณคลิกเซลล์อื่นที่ไม่มีรายการแบบเลื่อนลง การซูมเซลล์จะเป็นปกติ

หมายเหตุ: ในโค้ดด้านบน xซูม = 130 จะเปลี่ยนการซูมเซลล์รายการแบบเลื่อนลงเป็น 130คุณสามารถเปลี่ยนตัวเลขซูมนี้ได้ตามต้องการ


สร้างรายการแบบหล่นลงด้วยช่องทำเครื่องหมายใน Excel

หากคุณต้องการสร้างรายการแบบหล่นลงโดยมีช่องทำเครื่องหมายหลายช่องเพื่อเลือกหลายรายการจากรายการลงในเซลล์เดียวอาจไม่มีวิธีโดยตรงสำหรับคุณในการแก้ปัญหานี้ แต่, Kutools สำหรับ Excel สนับสนุนคุณสมบัติที่น่าทึ่ง - รายการแบบหล่นลงพร้อมกล่องกาเครื่องหมายด้วยคุณสมบัตินี้คุณสามารถสร้างรายการดรอปดาวน์ได้อย่างรวดเร็วโดยมีช่องทำเครื่องหมายในช่วงที่ระบุแผ่นงานปัจจุบันสมุดงานปัจจุบันหรือสมุดงานที่เปิดทั้งหมดตามความต้องการของคุณ  คลิกเพื่อดาวน์โหลด Kutools for Excel!


การสาธิต: เพิ่มขนาดตัวอักษรของรายการแบบเลื่อนลงด้วยรหัส VBA เพื่อขยายการซูม

สุดยอดเครื่องมือเพิ่มผลผลิตในสำนักงาน

🤖 Kutools AI ผู้ช่วย: ปฏิวัติการวิเคราะห์ข้อมูลโดยยึดตาม: การดำเนินการที่ชาญฉลาด   |  สร้างรหัส  |  สร้างสูตรที่กำหนดเอง  |  วิเคราะห์ข้อมูลและสร้างแผนภูมิ  |  เรียกใช้ฟังก์ชัน Kutools...
คุณสมบัติยอดนิยม: ค้นหา เน้น หรือระบุรายการที่ซ้ำกัน   |  ลบแถวว่าง   |  รวมคอลัมน์หรือเซลล์โดยไม่สูญเสียข้อมูล   |   รอบโดยไม่มีสูตร ...
การค้นหาขั้นสูง: VLookup หลายเกณฑ์    VLookup หลายค่า  |   VLookup ข้ามหลายแผ่น   |   การค้นหาที่ไม่ชัดเจน ....
รายการแบบเลื่อนลงขั้นสูง: สร้างรายการแบบหล่นลงอย่างรวดเร็ว   |  รายการแบบหล่นลงขึ้นอยู่กับ   |  เลือกหลายรายการแบบหล่นลง ....
ผู้จัดการคอลัมน์: เพิ่มจำนวนคอลัมน์เฉพาะ  |  ย้ายคอลัมน์  |  สลับสถานะการมองเห็นของคอลัมน์ที่ซ่อนอยู่  |  เปรียบเทียบช่วงและคอลัมน์ ...
คุณสมบัติเด่น: กริดโฟกัส   |  มุมมองการออกแบบ   |   บาร์สูตรใหญ่    สมุดงานและตัวจัดการชีต   |  ห้องสมุดทรัพยากร (ข้อความอัตโนมัติ)   |  เลือกวันที่   |  รวมแผ่นงาน   |  เข้ารหัส/ถอดรหัสเซลล์    ส่งอีเมลตามรายการ   |  ซุปเปอร์ฟิลเตอร์   |   ตัวกรองพิเศษ (กรองตัวหนา/ตัวเอียง/ขีดทับ...) ...
ชุดเครื่องมือ 15 อันดับแรก12 ข้อความ เครื่องมือ (เพิ่มข้อความ, ลบอักขระ, ... )   |   50 + แผนภูมิ ประเภท (แผนภูมิ Gantt, ... )   |   40+ ใช้งานได้จริง สูตร (คำนวณอายุตามวันเกิด, ... )   |   19 การแทรก เครื่องมือ (ใส่ QR Code, แทรกรูปภาพจากเส้นทาง, ... )   |   12 การแปลง เครื่องมือ (ตัวเลขเป็นคำ, การแปลงสกุลเงิน, ... )   |   7 ผสานและแยก เครื่องมือ (แถวรวมขั้นสูง, แยกเซลล์, ... )   |   ... และอื่น ๆ

เพิ่มพูนทักษะ Excel ของคุณด้วย Kutools สำหรับ Excel และสัมผัสประสิทธิภาพอย่างที่ไม่เคยมีมาก่อน Kutools สำหรับ Excel เสนอคุณสมบัติขั้นสูงมากกว่า 300 รายการเพื่อเพิ่มประสิทธิภาพและประหยัดเวลา  คลิกที่นี่เพื่อรับคุณสมบัติที่คุณต้องการมากที่สุด...

รายละเอียด


แท็บ Office นำอินเทอร์เฟซแบบแท็บมาที่ Office และทำให้งานของคุณง่ายขึ้นมาก

  • เปิดใช้งานการแก้ไขและอ่านแบบแท็บใน Word, Excel, PowerPoint, ผู้จัดพิมพ์, Access, Visio และโครงการ
  • เปิดและสร้างเอกสารหลายรายการในแท็บใหม่ของหน้าต่างเดียวกันแทนที่จะเป็นในหน้าต่างใหม่
  • เพิ่มประสิทธิภาพการทำงานของคุณ 50% และลดการคลิกเมาส์หลายร้อยครั้งให้คุณทุกวัน!
Comments (29)
No ratings yet. Be the first to rate!
This comment was minimized by the moderator on the site
Thanks so much!
This comment was minimized by the moderator on the site
I have multiple drop down buttons. The VBA code was working fine at the first attempt. But i had to change the layout of the form requiring movement of all the cells. Now, all the drop down cells works except for one. I tried deleting and repasting the code. The problem persist, all cells works except for that one. Please help.
This comment was minimized by the moderator on the site
Ale po zamknięciu pliku i ponownym go otwarciu to rozwiązanie już nie działa.
This comment was minimized by the moderator on the site
OKI. Trzeba zapisać plik z obsługą makra.
This comment was minimized by the moderator on the site
Hello friend,
You are right. We need to save the macro-enabled file so the solution can work. Have a great day.

Sincerely,
Mandy
This comment was minimized by the moderator on the site
Can we do this for multiple drop box? If not, then what is procedure for multiple drop box.
This comment was minimized by the moderator on the site
Ocurre al revés. Al dar clic en cualquiera celda se agranda, pero no en la lista desplegable y no vuelve al tamaño original. Uso Excel 2010. ¿Solución?It happens the other way around. Clicking on any cell enlarges it, but not the dropdown list and it does not return to the original size. I use Excel 2010. Solution?
This comment was minimized by the moderator on the site
Thank You for the tip to zoom the size of the font in the drop down box. It did the trick.
This comment was minimized by the moderator on the site
Hi, Just question i have pasted the code onto blank Module window (Right click in view code). Once i save, is function well that was good. But when i close the file and re-open it, the code was gone and no more enlarge for the drop down list. Can i know how to set for permanent use?
This comment was minimized by the moderator on the site
Hello, Ace,
To save the code, you should save the Excel file as Excel Macro-Enabled Workbook format. Please try it.
This comment was minimized by the moderator on the site
I have multiple dropdowns and only need one bigger as the rest are yes/no. But the code you shared is doing this for all of them. How do I only this to be used for one dropdown only?
This comment was minimized by the moderator on the site
Hello, Yvonne
To apply the code only to one cell, the following code may help you: (Note: in the code, change the cell I2 to your own cell reference.)
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
'updateby Extendoffice
    On Error GoTo LZoom
    Dim xZoom As Long
    Dim xRg As Range
    xZoom = 100
    Set xRg = Range("I2")
    If Not Intersect(Target, xRg) Is Nothing Then
        If Target.Validation.Type = xlValidateList Then xZoom = 130
    End If
LZoom:
    ActiveWindow.Zoom = xZoom
End Sub

Please try, hope it can help you!
This comment was minimized by the moderator on the site
How can I apply this font change size to only one column? I have several columns with drop-down boxes and I only want one specific column to change font size?
This comment was minimized by the moderator on the site
This zooms the whole sheet to 130%
How do I increase only the drop menu ?
This comment was minimized by the moderator on the site
Hello, Dave,
To only increase the drop down menu, here is a workaround to solve it.

First, after inserting the drop down list in your worksheet, then you should insert an Combo Box (ActiveX Controls),and then apply the following VBA code into the sheet module code:

Dim xRg As Range
Private Sub ComboBox1_Change()
On Error Resume Next
xRg.Value = Me.ComboBox1.Text
End Sub
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
On Error GoTo LblExit
With Me.ComboBox1
.Visible = False
If Target.Validation.Type = xlValidateList Then
Target.Validation.InCellDropdown = False
.ListWidth = 120
.ListFillRange = ""
.ListFillRange = Target.Validation.Formula1
.Left = Target.Left
.Top = Target.Top
.Width = Target.Width
.Height = Target.Height
.Font.Size = 16
.Visible = True
Set xRg = Target
End If
End With
LblExit:
End Sub

After inserting the code, now when you click the drop down list cell, a combo box will be displayed, and font size in the drop down menu is increased as you need. And the inserted combo box will be hidden automatically.

Please try it, hope it can help you!
This comment was minimized by the moderator on the site
Can you explain it step by step for dummies pls?
This comment was minimized by the moderator on the site
Hello, ITALO,
1. Insert the drop down you need in your worksheet;
2. Then insert a Combo Box (ActiveX Controls) by clicking Developer > Insert > Combo Box (ActiveX Controls), and then drag the mouse to draw a Combo Box object;
3. And then, right click your current used worksheet, choose View Code, and paste the above code into the module;
4. At last, click Design Mode under the Developer tab to disable it.
5. Now when you click the drop down list cell, a combo box will be displayed, and font size in the drop down menu is increased as you need.
Please try, hope it can help you!
This comment was minimized by the moderator on the site
GENIUS! Thank you Skyyang! So grateful for your method! Works like a charm!
This comment was minimized by the moderator on the site
After using this code, I can't use return key on Excel. How can I code (install) return key?
There are no comments posted here yet
Load More
Please leave your comments in English
Posting as Guest
×
Rate this post:
0   Characters
Suggested Locations