HTML类型在Excel中下拉 [英] HTML type drop down in excel

查看:46
本文介绍了HTML类型在Excel中下拉的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有什么办法可以在excel中创建一个下拉菜单,该下拉菜单将显示一个值而不是文本,例如第一个选项是选项1,但值是1

Is there any way to have a dropdown in excel that will show a value instead of the text e.g. First option is Option 1 but value is 1

我试图为用户提供一种选择项目的简便方法,而不必知道数据库中该项目的ID.

I am trying to find an easy for users to select an item without having to know the ID of that item in the database.

推荐答案

可以.

首先将 ListFillRange属性设置为多列范围(例如,"A1:B3").然后将 ColumnWidths属性设置为"50; 0",这将使第二列不可见.最后,将 BoundColumn属性设置为2.

First set the ListFillRange property to a multi-column range (for example, "A1:B3"). Then set the ColumnWidths property to something like "50;0", which will make the second column invisible. And finally, set the BoundColumn property to 2.

该列表将显示Option1,Option2,Option3.而且,如果您查询它的值(ComboBox1.Value),它将返回与所选选项(1、2或3)关联的值.

The list will display Option1, Option2, Option3. And if you query it's value (ComboBox1.Value), it will return the value associated with the selected option (1, 2 or 3).

这篇关于HTML类型在Excel中下拉的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆