如何加入VBA中的集合 [英] How to join a collection in VBA
本文介绍了如何加入VBA中的集合的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
有没有办法加入VBA中的集合?
我可以找到join(array,;),但是此函数不能应用于集合。
Is there a way to join a collection in VBA? I can find join(array, ";"), but this function can not be applied to a collection.
$ b
推荐答案
不幸的是,没有内置的。
Unfortunately, no, there's nothing built-in.
-
将集合转换为数组(无论是内置的,还是循环浏览所有项目),然后使用
Join(array,;)
或
>第一个标志,循环遍历项目,如果不是,首先添加;
>,添加项目)。
join your collection "the hard way" (set first
flag, loop through items, add ";" if not first
, clear first
, add item).
这篇关于如何加入VBA中的集合的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文