如何在excel VBA中的表单中的组合框中添加项目? [英] How to add items to a combobox in a form in excel VBA?

查看:395
本文介绍了如何在excel VBA中的表单中的组合框中添加项目?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我很熟悉VBA。我想创建一个窗体,用户选择一个组合框的项目,并且选择运行一个宏。我在VBA中创建了一个用户表单,但是我无法将项目添加到组合框中。当用户打开窗体时,我想要选择在组合框中已经加载了,我可以完成这个吗?



谢谢

解决方案

我发现这个;



Excel VBA ComboBox列表



从这里;



vba-可以提供更多的组合框一栏是它的文本框部分?



这可能有帮助;



填充组合框VB​​A



我在这里添加了一个演示;



使用填充框.xlsm


I am new to VBA. I want to create a form where a user selects an item of a combobox and the selection runs a macro.I created a user form in VBA but I am unable to add items to the Combobox.When a user opens the form I want the choices in the combobox to be already loaded.how can I accomplish this?

Thank You

解决方案

I found this;

Excel VBA ComboBox Lists

from here;

vba- Can a combobox present more then one column on it's textbox part?

and this may help;

Populating ComboBoxes VBA

I added a sort of demo here;

Playing with populating boxes.xlsm

这篇关于如何在excel VBA中的表单中的组合框中添加项目?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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