VBA(Visual Basic for Applications)与MS Excel集成 [英] VBA (Visual Basic for Applications) ntegration with MS Excel

查看:158
本文介绍了VBA(Visual Basic for Applications)与MS Excel集成的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何将Excel工作表中的数据插入表单列表框.问题是excel加载项的一部分,该加载项从excel工作表中获取数据.可能需要通过使用循环来迭代数据并且必须对其进行过滤,尝试了很多次,但VBA循环很难理解.

How can we insert data from an excel sheet into a forms listbox. The question is part of an add-in for excel which takes data from an excel sheet. The data is iterated and has to be filtered, probably by using loops, tried a lot but VBA loops are difficult to understand. Any help regarding this topic will be greatly appreciated.

推荐答案

您可以将数据插入到ListBox中,如下所示:
http://support.microsoft.com/kb/161598 [
You can insert data into a ListBox like this:
http://support.microsoft.com/kb/161598[^]

If VBA loops are too difficult then perhaps you can try to use Excel functionality (and record this as a macro) to sort or filter the data.

But I think it''s easier to write a simple loop that evaluates the data and add it to the List Box or copies it to a range that can be used as RowSource.


这篇关于VBA(Visual Basic for Applications)与MS Excel集成的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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