我想将组合框中的所有项目存储在一个变量中。变量应该是什么类型?我试着做一个
Dim ComboBoxItems() As String ' dynamic array of strings
但是我不确定如何将组合框中的项目复制到这个动态数组中?
我可以循环执行:
for i = 1 to combobox.ListCount - 1
ComboBoxItems(i+1) = combobox.List(i)
next i
(注意,我说得对吗,它真的很疯狂,动态数组是 1 索引的,而组合框列表是 0 索引的??)
这是要走的路吗?或者肯定有一种方法可以在没有循环的情况下复制整个列表?