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. 【洛谷 1345】 奶牛的电信
  2. R语言计算dataframe数据列中各分类的计数(类似pandas value_counts函数功能)
  3. Logstash 父子关系 配置
  4. TimeLine CSS/Javascript 时间线
  5. java字符串操作_Java的字符串操作
  6. 基于 Webpack2、Vue2、iView2 的可视化脚手架 iView Cli 发布 2.0 版本
  7. Sharepoint学习笔记—架构系列
  8. uart怎么判断帧错误_UART通讯总线工作原理的理解
  9. 若依同时集成jsp和thymeleaf解决方案
  10. AC97 与 HD audio的区别
  11. 中学计算机课小课题,中学信息技术课题题目
  12. netty 错误 #[IllegalReferenceCountException: refCnt: 0, decrement: 1]
  13. vue倒计时:天时分秒
  14. CMS企业建站的经验
  15. 1400——489C,520B,279B,479C
  16. 企业提高客户保持率基本方法
  17. 前端学习笔记(5)-ES6中promise、Generator、Module等使用场景
  18. android在google map上画出导航路线图
  19. spring boot 打包成二进制可以直接执行的jar , 非java -jar 启动方式
  20. 谈一谈Android适配(从蓝湖切图模糊问题说开去)

热门文章

  1. html5 日历 仿ios,一款完整的蓝白风格HTML5日历应用程序
  2. labwindows随机数生成c语言,LabWindows/CVI虚拟仪器设计技术基本控件使用之:回调函数...
  3. 记录在Deepin Linux上使用Jupyter/Pycharm中关于findfont: Font family [‘sans-serif‘] not found的解决方案及相关问题
  4. 数字图像处理 - 实验作业一 - Python
  5. 计算机病毒级防范措施总结,计算机病毒及防范措施
  6. 浅谈网银USB key使用原理与安全策略
  7. Windows7计算机的程序文件名,Win7怎么显示文件后缀名_Win7显示文件的扩展名-192路由网...
  8. open 3D 点云兔子模型
  9. 『原创』老范的Bug跟踪管理系统0.1 Alpha——介绍篇
  10. 宝塔linux面板环境安装,BT.CN宝塔面板环境安装流程(图文教程)