提示:其它语言是由 Google 机器翻译的。 你可以访问 English 版本。
登录
x
or
x
x
马上登记
x

or

如何增加Excel中的下拉列表字体大小?

doc增加字体大小下拉列表1

在Excel中,下拉列表是一个非常有用的功能,当您在工作表中创建下拉列表时,是否曾尝试增加下拉列表的字体大小以使选定记录更大且更易读,如左侧截图所示? 本文将讨论解决该问题的解决方法。

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


将多个工作表或csv文件组合/导入到一个工作表或工作簿中:

在您的日常工作中,将多个工作表,工作簿和csv文件合并到一个工作表或工作簿中可能是一项巨大而头痛的工作。 但是,如果你有 Kutools for Excel,其强大的功能 - 结合,您可以将多个工作表,工作簿或csv文件快速合并到一个工作表或工作簿中。

doc计算字母等级1

Kutools for Excel:比200方便的Excel加载项,可以在60天免费试用。 下载并免费试用现在!


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


事实上,我们没有直接的方法来增加下拉列表的字体大小,但是,您可以应用以下VBA代码来更改下拉列表单元格缩放设置,以使文本显得更大。 请做如下操作:

1. 转到包含您想要增加其字体大小的下拉列表的工作表。

2。 右键单击工作表选项卡,然后选择 查看代码 从上下文菜单中,弹出 Microsoft Visual Basic for Applications 窗口,请将以下代码复制并粘贴到空白处 模块 窗口:

VBA代码:增加下拉列表字体大小以放大单元格缩放

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 = 130
LZoom:
    ActiveWindow.Zoom = xZoom
End Sub

3. 然后保存并关闭此代码,现在,当您单击下拉列表单元格时,单元格的缩放将被放大,并且下拉列表将显得更大,但是,当您单击不包含下拉列表的其他单元格时,单元格缩放将会正常。

注意:在上面的代码中, xZoom = 130 将更改下拉列表单元格缩放为 130,您可以根据需要更改此缩放数字。


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


Kutools for Excel - 最佳办公生产力工具提高80%的生产力

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

Office选项卡为Office提供选项卡式界面,使您的工作更轻松

  • 在Word,Excel,PowerPoint中启用选项卡式编辑和阅读,Publisher,Access,Visio和Project。
  • 在同一窗口的新选项卡中打开并创建多个文档,而不是在新窗口中。
  • 通过50%提高您的工作效率,每天为您减少数百次鼠标点击!
官方底部
Say something here...
symbols left.
You are guest ( Sign Up? )
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.
    Ace · 9 months 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 · 9 months 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.
    Paul Roberts · 1 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.
    Dave Harlev · 1 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 · 1 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 · 3 months ago
        Can you explain it step by step for dummies pls?
        • To post as a guest, your comment is unpublished.
          skyyang · 2 months 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 · 7 months ago
        GENIUS! Thank you Skyyang! So grateful for your method! Works like a charm!
  • To post as a guest, your comment is unpublished.
    George · 1 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 · 1 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 · 2 years ago
    Thanks, it works well
  • To post as a guest, your comment is unpublished.
    Noel · 2 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.
      Miemie Yang · 2 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 · 2 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 · 1 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 · 2 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 · 2 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 · 2 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%.