Note: The other languages of the website are Google-translated. Back to English
登陆  \/ 
x
or
x
点此注册  \/ 
x

or

如何在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 for Excel 支持惊人的功能- 带有复选框的下拉列表,使用此功能,您可以根据需要快速创建带有指定范围,当前工作表,当前工作簿或所有打开的工作簿中的复选框的下拉列表。  点击下载Kutools for Excel!


演示:使用VBA代码增加下拉列表字体大小以放大缩放


最佳办公效率工具

Kutools for Excel解决了您的大多数问题,并使您的生产率提高了80%

  • 重用: 快速插入 复杂的公式,图表 以及您以前使用过的任何东西; 加密单元 带密码 创建邮件列表 并发送电子邮件...
  • 超级公式栏 (轻松编辑多行文本和公式); 阅读版式 (轻松读取和编辑大量单元格); 粘贴到过滤范围...
  • 合并单元格/行/列 不会丢失数据; 拆分单元格内容; 合并重复的行/列...防止细胞重复; 比较范围...
  • 选择重复或唯一 行; 选择空白行 (所有单元格都是空的); 超级查找和模糊查找 在许多工作簿中; 随机选择...
  • 确切的副本 多个单元格,无需更改公式参考; 自动创建参考 到多张纸; 插入项目符号,复选框等...
  • 提取文字,添加文本,按位置删除, 删除空间; 创建和打印分页小计; 在单元格内容和注释之间转换...
  • 超级滤镜 (将过滤方案保存并应用于其他工作表); 高级排序 按月/周/日,频率及更多; 特殊过滤器 用粗体,斜体...
  • 结合工作簿和工作表; 根据关键列合并表; 将数据分割成多个工作表; 批量转换xls,xlsx和PDF...
  • 超过300种强大功能。 支持Office / Excel 2007-2019和365。支持所有语言。 在您的企业或组织中轻松部署。 完整功能30天免费试用。 60天退款保证。
kte选项卡201905

Office选项卡为Office带来了选项卡式界面,使您的工作更加轻松

  • 在Word,Excel,PowerPoint中启用选项卡式编辑和阅读,发布者,Access,Visio和Project。
  • 在同一窗口的新选项卡中而不是在新窗口中打开并创建多个文档。
  • 每天将您的工作效率提高50%,并减少数百次鼠标单击!
officetab底部
Say something here...
symbols left.
You are guest
or post as a guest, but your post won't be published automatically.
Loading comment... The comment will be refreshed after 00:00.
  • To post as a guest, your comment is unpublished.
    David Frost · 1 years ago
    Thank You for the tip to zoom the size of the font in the drop down box. It did the trick.

  • To post as a guest, your comment is unpublished.
    Ace · 2 years ago
    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?
    • To post as a guest, your comment is unpublished.
      skyyang · 2 years ago
      Hello, Ace,
      To save the code, you should save the Excel file as Excel Macro-Enabled Workbook format. Please try it.
  • To post as a guest, your comment is unpublished.
    Paul612 · 3 years ago
    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?
  • To post as a guest, your comment is unpublished.
    david.harlev@gmail.com · 3 years ago
    This zooms the whole sheet to 130%
    How do I increase only the drop menu ?
    • To post as a guest, your comment is unpublished.
      skyyang · 3 years ago
      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!
      • To post as a guest, your comment is unpublished.
        ITALO BELMONTE · 2 years ago
        Can you explain it step by step for dummies pls?
        • To post as a guest, your comment is unpublished.
          skyyang · 2 years ago
          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!
      • To post as a guest, your comment is unpublished.
        GJ · 2 years ago
        GENIUS! Thank you Skyyang! So grateful for your method! Works like a charm!
  • To post as a guest, your comment is unpublished.
    George · 3 years ago
    After using this code, I can't use return key on Excel. How can I code (install) return key?
  • To post as a guest, your comment is unpublished.
    John Driscoll · 3 years ago
    This does not work for me. I pasted the text as instructed. When i clicked on the drop down menu the font size was the same. When i then clicked on a different cell, the whole spreadsheet increased in size perhaps by 30%. Really would like a work around if possible
  • To post as a guest, your comment is unpublished.
    Ahmed Sobhy · 3 years ago
    Thanks, it works well
  • To post as a guest, your comment is unpublished.
    Noel · 3 years ago
    Hi, Just wondering why this feature disappear after the file is saved and re-open?
    • To post as a guest, your comment is unpublished.
      miemieyang005@gmail.com · 3 years ago
      Hi, Noel, you should save the Excel file as Excel Macro-Enabled Workbook format.
  • To post as a guest, your comment is unpublished.
    Travis · 4 years ago
    Like the directions indicate, you must change the zoom from "100" to "130" or a different zoom to see any changes. However, the 1st comment is accurate in that it does not just change the drop down menu, but rather once you click on the cell it will zoom the entire sheet 130% to zoom in on that cell. Not very helpful because then you just have to zoom back out every time.
    • To post as a guest, your comment is unpublished.
      garth · 3 years ago
      or select an alternate cell in the workbook to return it to 100 as stated in the Macro

      Private Sub Worksheet_SelectionChange(ByVal Target As Range)'updateby Extendoffice 20160530 On Error GoTo LZoom Dim xZoom As Long xZoom = 100 If Target.Validation.Type = xlValidateList Then xZoom = 130LZoom: ActiveWindow.Zoom = xZoomEnd Sub
  • To post as a guest, your comment is unpublished.
    Harlem Eins · 4 years ago
    I'm running Office 2016 and using drop-down boxes. I tried the "Increase drop down list font size with VBA code to enlarge the zoom" but it does not work. Is there anything else I should do to make it work?

    Thank you!
  • To post as a guest, your comment is unpublished.
    Michael · 4 years ago
    So, this code makes the whole sheet zoom, not just the drop down box. It also says "cannot save...... VB Project in a macro disabled workbook". Blah blah blah. If I have to hunt all over hell's half acre to get a complete answer to this issue, this is not an answer.
    • To post as a guest, your comment is unpublished.
      Harlem Eins · 4 years ago
      [quote name="Michael"]So, this code makes the whole sheet zoom, not just the drop down box. It also says "cannot save...... VB Project in a macro disabled workbook". Blah blah blah. If I have to hunt all over hell's half acre to get a complete answer to this issue, this is not an answer.[/quote]

      Simply save the workbook as xlsm and follow the steps again. BTW I tried it and it does NOT work for me at all; zoom is still at 100%.