HTML type drop down in excel

2019-09-05 21:23发布

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

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.

标签: excel
2条回答
爱情/是我丢掉的垃圾
2楼-- · 2019-09-05 21:45

Yes you can.

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.

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).

查看更多
Bombasti
3楼-- · 2019-09-05 22:03

No, you can not.

But you may use your Options as IDs in the database as long as none of them are duplicates (which I think should be the case, or your users will not be able to distinguish them).

查看更多
登录 后发表回答