excel 中vb组合框

With Excel VBA programming, you can add a Combo Box to the worksheet, to show a data validation list. Usually a single column combo box is enough, like this list of weekdays, but sometimes a multi-column Excel combo box is better.

使用Excel VBA编程,可以将组合框添加到工作表中 ,以显示数据验证列表。 通常,像这样的工作日列表,单列组合框就足够了,但是有时多列Excel组合框会更好。

单列或多列组合框 (Single or Multi-Column Combo Box)

First, here is a single column combo box, showing a list of weekday names.

首先,这是一个单列组合框,其中显示了工作日名称的列表。

In some cases, it's helpful to have a multi-column combo box. For example, instead of a single-column list with just the product codes, you could show the product names in another column.

在某些情况下,使用多列组合框会很有帮助。 例如,您可以在另一列中显示产品名称,而不是仅包含产品代码的单列列表。

That way, people will know exactly what they're selecting, without memorizing a long list of product codes.

这样,人们将完全知道他们选择的内容,而无需记住一长串产品代码。

Then, when you select an item from the drop down list, only the product code is added to the worksheet cell.

然后,当您从下拉列表中选择一个项目时,只有产品代码被添加到工作表单元格中。

查询清单 (The Lookup Lists)

On another worksheet, there are two named ranges – ToolList (A1:A7) and ToolListFull (A1:B7).

在另一个工作表上,有两个命名范围– ToolList(A1:A7)和ToolListFull(A1:B7)。

The ToolListFull range is used as the ListFillRange for the Combo Box, and ToolList is used for the data validation list.

ToolListFull范围用作组合框的ListFillRange,ToolList用作数据验证列表。

组合框设置 (Combo Box Settings)

To show two columns in the combo box, open its property window, and change its ColumnCount setting to 2.

要在组合框中显示两列,请打开其属性窗口,并将其ColumnCount设置更改为2。

When you double-click on a data validation cell, event code runs, that finds the list used in the data validation cell.

双击数据验证单元时,将运行事件代码,该事件代码将找到数据验证单元中使用的列表。

Then, "Full" is added to that name, to find the list for the combo box.

然后,“ Full”添加到该名称,以查找组合框的列表。

下载样本工作簿 (Download the Sample Workbook)

To see the multi-column combo box, and the code, click this link to download the Multi-Column Combo Box sample file.

要查看多列组合框和代码,请单击此链接以下载“ 多列组合框”样本文件。

The zipped file contains macros, so be sure to enable macros after you unzip the file and open it. _______________

压缩后的文件包含宏,因此请确保在解压缩并打开文件后启用宏。 _______________

翻译自: https://contexturesblog.com/archives/2011/05/27/multi-column-excel-combo-box/

excel 中vb组合框


http://www.taodudu.cc/news/show-2415201.html

相关文章:

  • Excel快速合并,简单方法,轻松搞定!
  • [note] 电磁场和微波课组(一)——电磁学(电学部分)
  • Google I/O 2014之Android面面观
  • 心力哲学——艰难多变环境下快乐、自由与生存力的源泉(二)
  • 有量纲和无量纲是什么意思_物理量和量纲
  • LQR,iLQR,DDP控制论经典算法(MBRL基础知识)
  • 二项式与小苹果
  • 及时复盘的好处_及时复盘,促进成长
  • 云队友丨盘点,到底盘什么?
  • 大学物理复习笔记:刚体力学基础,动量矩
  • 经典力学总结
  • 不定期备考小tips[常微][2] #20210528
  • 滴滴上市年营收超千亿,程维:我必须时刻保持危机感
  • 《WebRTC源码深入剖析》总结
  • 理论力学知识要点(八)
  • 大学物理(上)知识点总结
  • 北风的年终总结2021
  • R可视化:plot函数基础操作
  • 关于原子的电子组态、谱项和精细结构
  • 探索的乐趣(物理笔记)
  • 关于我的 “二进制部署 kubernetes 集群” 的体验
  • Unity3D 力
  • 卫星运动的微分方程
  • 理论物理极础附录:有心力和行星轨道
  • 有心力为保守力,机械能守恒
  • 大学物理笔记——第二章质点动力学
  • fl_chart的简单使用——BarChart
  • QT编写BarChart直方图
  • 关于JFreeChart中BarChart柱体宽度设置的问题纪要
  • Android MPAndroidChart之柱状图BarChart

excel 中vb组合框_多列Excel组合框相关推荐

  1. excel中 复制工作表_如何在Excel 2013中轻松移动或复制工作表

    excel中 复制工作表 There may be times when you want to create a new Excel worksheet based on an existing w ...

  2. excel 中vb组合框_在Excel 2010中修复组合框大小调整

    excel 中vb组合框 With Excel data validation, you can create drop down lists on a worksheet. However, the ...

  3. excel 中vb组合框_Excel组合框上的标题

    excel 中vb组合框 Excel组合框上的标题 (Headers on Excel Combo Boxes) You can use combo boxes to show a drop down ...

  4. excel 中vb组合框_Excel表中的数据验证组合框

    excel 中vb组合框 There are instructions on my Contextures website for using a combo box with data valida ...

  5. excel 中vb组合框_Excel数据验证组合框代码

    excel 中vb组合框 Instead of selecting a product code in an Excel drop down list, it's usually easier to ...

  6. 在excel日期比对大小_如何在Excel中防止分组日期

    在excel日期比对大小 As a teenager, group dates can be fun. If you have strict parents, that might be the on ...

  7. excel公式单元格注释_如何在Excel中隐藏注释,公式,溢出文本和网格线

    excel公式单元格注释 We've shown you how to hide cells, rows, and columns and how to hide worksheets/tabs an ...

  8. 计算机表格行列,excel表格中行列数据切换-在excel中如何切换图表的行/列数据

    Word表格中怎样进行行列互换 excel表格如何部分行列置换 Excel中实现行列互换的具体操作知如下: 1.打开excel. 2.选中表格,然后点击[复制]. 3.选择一个空白单元格. 4.点击[ ...

  9. 在EXCEL中取出有交集的数据列

    在EXCEL中取出有交集的数据列 Sub SQL_Excel_2010() 'On Error Resume Next '如果出bai现错误,忽略,然后执行下一行代码 Application.Scre ...

  10. oracle 数据 导出 excel 自动分多个文件,从oracle数据库中导出大量数据到excel中为什么自动分成了好几个excel文件《excel表格新手入门》...

    EXCEL中一个单元格中多行文本如何导入或复制到SQL SERVER 数据库表中? 保留换行符保存进数据表啊,读取出来显示的时候根据需要进行转换就行了,比如要在网页上显示,可以把换行符转换成HTML的 ...

最新文章

  1. 在node.js中,使用基于ORM架构的Sequelize,操作mysql数据库之增删改查
  2. 最全面详细讲解Oracle入门
  3. VS2017 Intelligense C++ 设置的几个重点
  4. 总奖金15万,双赛道同名消歧挑战赛报名进行中
  5. server 2008R2 AD域环境中DHCP服务器的授权步骤
  6. SpringBoot2 集成日志,复杂业务下的自定义实现
  7. centos安装后iptables基本设置
  8. html上传文件出现fakepath,chrome upload file 出现 fakepath,请解决方案
  9. iOS应用安全-专栏总目录(持续更新) 丨蓄力计划
  10. 哈利波特分院考试(HP)
  11. 基于android的校友帮平台系统
  12. 生鲜冷链冻品零售企业订货管理系统解决方案
  13. 我是如何学习的,分享本人的学习方法
  14. [原创]三国人物简单分析
  15. 判断一个数是否为素数的一个讨论(一)
  16. 使用 Stunnel 加密
  17. Qt判断文件夹路径、文件是否存在不存在则创建
  18. “华为杯”研究生数学建模竞赛2020年-【华为杯】E题:大雾演化规律的量化分析与预测模型研究(附优秀论文及MATLAB代码)
  19. HTML中常用的特殊字符
  20. MXM显卡底板设计注意事项

热门文章

  1. 中科银谷:企业工商数据工商查询API接口应该如何选择?
  2. 科技论文写作个人心得
  3. Android 杂记 - 存货盘点用的客户端
  4. win7旗舰版显示不了文件扩展名提示需要administrators提供权限才能对此文件进行更改
  5. Bootstrap框架使用及可视化布局
  6. PLC调试中的四个步骤
  7. macBook笔记本音乐播放器没声音
  8. 笔记——c51的led点阵流动字幕
  9. 绝对误差和相对误差的定义
  10. html看汉字选拼音小游戏