excel 中vb组合框
With Excel data validation, you can create drop down lists on a worksheet. However, the font size is very small, and can't be adjusted, and you can only see 8 items at at time.
使用Excel数据验证 ,您可以在工作表上创建下拉列表。 但是,字体很小,无法调整,并且一次只能看到8个项目。
With Excel VBA programming, you can add a ComboBox to the worksheet, to show the data validation list. In the ComboBox, you can control the font size and the number of visible items in the list.
使用Excel VBA编程,可以将ComboBox添加到工作表中 ,以显示数据验证列表。 在ComboBox中,您可以控制字体大小和列表中可见项目的数量。
Excel 2010中的问题 (Problems in Excel 2010)
Although this technique works nicely in Excel 2007, and earlier versions, you might have a problem with the ComboBox size in Excel 2010.
尽管此技术在Excel 2007和早期版本中效果很好,但是您在Excel 2010中的ComboBox大小可能有问题。
In the screen shot below, the ComboBox is about 1/4" wide, instead of filling the entire cell.
在下面的屏幕截图中,组合框的宽度约为1/4英寸,而不是填充整个单元格。
In other workbooks, the ComboBox is so narrow that you can't see it at all. That's not too helpful a feature!
在其他工作簿中,ComboBox太窄了,您根本看不到它。 这对功能没有太大帮助!
在Excel 2010中解决问题 (Fix the Problem in Excel 2010)
Fortunately, the problem is easy to fix in Excel 2010, if you follow these steps.
幸运的是,如果按照以下步骤操作,则很容易在Excel 2010中解决此问题。
On the Developer tab, click the Design Mode command.
在“开发人员”选项卡上,单击“设计模式”命令。
To select the ComboBox, type its name in the Name Box, and press Enter
要选择组合框,请在名称框中键入其名称,然后按Enter。
On the Ribbon, under Drawing Tools, click Format, and click the Dialog Launcher for the Size group.
在功能区上,在“绘图工具”下,单击“格式”,然后单击“对话框”,然后单击“大小”组。
In the Format Shape dialog box, in the Size category, remove the check mark for Lock Aspect Ratio, and click OK
在“格式形状”对话框的“大小”类别中,删除“锁定宽高比”的复选标记,然后单击“确定”。
That should fix the ComboBox sizing problem!
那应该解决ComboBox大小问题!
观看组合框大小调整视频 (Watch the Combo Box Sizing Video)
To see the steps for changing the Size setting in Excel 2010, you can watch this short Excel video tutorial.
若要查看在Excel 2010中更改“大小”设置的步骤,可以观看此简短的Excel视频教程。
翻译自: https://contexturesblog.com/archives/2011/05/09/fix-combo-box-sizing-in-excel-2010/
excel 中vb组合框