如何在VBA中同时循环数组
我的问题是循环中的如何在VBA中同时循环数组,vba,vba6,Vba,Vba6,我的问题是循环中的j完成后,i将移动 我想同时运行2循环数组 ReDim ArrayItems(Download_frm.ListBox1.ListCount) ReDim ArrayItems1(Download_frm.accountb.ListCount) For i = 1 To Download_frm.ListBox1.ListCount Download_frm.ListBox1.ListIndex = i - 1 ArrayItems(i) = Download_f
j
完成后,i
将移动
我想同时运行2循环数组
ReDim ArrayItems(Download_frm.ListBox1.ListCount)
ReDim ArrayItems1(Download_frm.accountb.ListCount)
For i = 1 To Download_frm.ListBox1.ListCount
Download_frm.ListBox1.ListIndex = i - 1
ArrayItems(i) = Download_frm.ListBox1.Text
MsgBox ArrayItems(i)
'myarray = ArrayItems(i)
For j = 1 To Download_frm.accountb.ListCount
Download_frm.accountb.ListIndex = j - 1
ArrayItems1(j) = Download_frm.accountb.Text
MsgBox ArrayItems1(j)
'MsgBox ArrayItems1(j)
accountli = ArrayItems1(j)
'MsgBox ArrayItems(i)
COCODELI = ArrayItems(i)
Next j
Next i
VBA不支持多线程,因此不能同时运行它们。目前,您以嵌套方式运行它们。您不希望“同时运行2个循环数组”,这不是您的目标。这只是你目前认为你可以达到目标的方式。描述你的目标。