Salt la conținutul principal

Cum se mărește dimensiunea fontului listei drop-down în Excel?

doc crește dimensiunea fontului lista derulantă 1

Lista derulantă este o caracteristică foarte utilă în Excel, când creați o listă derulantă în foaia de lucru, ați încercat vreodată să măriți dimensiunea fontului din lista derulantă pentru a face înregistrarea selectată mai mare și mai ușor de citit pe măsură ce se afișează captura de ecran din stânga? Acest articol va vorbi despre o soluție pentru a o rezolva.

Măriți dimensiunea fontului listei drop-down cu codul VBA pentru a mări zoomul


Măriți dimensiunea fontului listei drop-down cu codul VBA pentru a mări zoomul

De fapt, nu există nicio modalitate directă de a crește dimensiunea fontului din lista derulantă, dar puteți aplica următorul cod VBA pentru a modifica setarea de zoom a celulelor listei derulante pentru a face textul să pară mai mare. Vă rugăm să faceți următoarele:

1. Accesați foaia de lucru care conține lista derulantă pe care doriți să o măriți dimensiunea fontului.

2. Faceți clic dreapta pe fila foaie și selectați Afișați codul din meniul contextual, în fereastra pop-out Microsoft Visual Basic pentru aplicații fereastra, copiați și lipiți următorul cod în spațiul gol Module fereastră:

Cod VBA: creșteți dimensiunea fontului din lista derulantă pentru a mări zoomul celulei

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. Apoi salvați și închideți acest cod, acum, când faceți clic pe celulele listei derulante, zoomul celulei va fi mărit, iar lista derulantă va apărea mai mare, dar, când faceți clic pe alte celule, nu conține lista derulantă, zoom-ul celulei va fi normal.

notițe: În codul de mai sus, xZoom = 130 va schimba lista de derulare a celulelor cu zoom 130, puteți modifica acest număr de zoom în funcție de nevoile dvs.


Creați o listă verticală cu casete de selectare în Excel

Dacă trebuie să creați o listă derulantă cu mai multe casete de selectare pentru a selecta mai multe elemente din listă într-o singură celulă, poate că nu există o modalitate directă de a rezolva această sarcină. Dar, Kutools pentru Excel acceptă o caracteristică uimitoare - Listă derulantă cu casete de selectare, cu această caracteristică, puteți crea rapid o listă derulantă cu casete de selectare într-un interval specificat, foaia de lucru curentă, registrul de lucru curent sau toate registrele de lucru deschise în funcție de nevoile dvs.  Faceți clic pentru a descărca Kutools pentru Excel!


Demo: Măriți dimensiunea fontului listei derulante cu codul VBA pentru a mări zoomul

Cele mai bune instrumente de productivitate de birou

🤖 Kutools AI Aide: Revoluționați analiza datelor pe baza: Execuție inteligentă   |  Generați codul  |  Creați formule personalizate  |  Analizați datele și generați diagrame  |  Invocați funcțiile Kutools...
Caracteristici populare: Găsiți, evidențiați sau identificați duplicatele   |  Ștergeți rândurile goale   |  Combinați coloane sau celule fără a pierde date   |   Rundă fără Formula ...
Super căutare: VLookup cu mai multe criterii    VLookup cu valori multiple  |   VLookup pe mai multe foi   |   Căutare fuzzy ....
Listă derulantă avansată: Creați rapid o listă derulantă   |  Listă drop-down dependentă   |  Listă derulantă cu selectare multiplă ....
Manager de coloane: Adăugați un număr specific de coloane  |  Mutați coloanele  |  Comutați starea vizibilității coloanelor ascunse  |  Comparați intervale și coloane ...
Caracteristici prezentate: Focus pe grilă   |  Vedere de proiectare   |   Big Formula Bar    Manager registru de lucru și foi   |  Biblioteca de resurse (Text automat)   |  Data Picker   |  Combinați foi de lucru   |  Criptare/Decriptare celule    Trimiteți e-mailuri după listă   |  Super Filtru   |   Filtru special (filtrează bold/italic/barat...) ...
Top 15 seturi de instrumente12 Text Instrumente (Adăuga text, Eliminați caractere,...)   |   50+ Diagramă Tipuri de (Gantt Chart,...)   |   40+ Practic Formule (Calculați vârsta pe baza zilei de naștere,...)   |   19 inserare Instrumente (Introduceți codul QR, Inserați imaginea din cale,...)   |   12 Convertire Instrumente (Numere la cuvinte, conversie valutara,...)   |   7 Merge & Split Instrumente (Rânduri combinate avansate, Celule divizate,...)   |   ... și altele

Îmbunătățiți-vă abilitățile Excel cu Kutools pentru Excel și experimentați eficiența ca niciodată. Kutools pentru Excel oferă peste 300 de funcții avansate pentru a crește productivitatea și a economisi timp.  Faceți clic aici pentru a obține funcția de care aveți cea mai mare nevoie...

Descriere


Fila Office aduce interfața cu file în Office și vă face munca mult mai ușoară

  • Activați editarea și citirea cu file în Word, Excel, PowerPoint, Publisher, Access, Visio și Project.
  • Deschideți și creați mai multe documente în filele noi ale aceleiași ferestre, mai degrabă decât în ​​ferestrele noi.
  • Vă crește productivitatea cu 50% și reduce sute de clicuri de mouse pentru dvs. în fiecare zi!
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