使用多线程 改造循环 Command2 等效 Command1过程 哪位大神出手帮忙修改一下
'使用多线程 改造循环 Command2 等效 Command1过程 哪位大神出手帮忙修改一下Private Sub Command1_Click()
Dim b(100, 1000)
Dim i As Long, j As Long
For i = 1 To 100
For j = 1 To 1000
b(i, j) = i * j
Next
Next
End Sub
Private Sub Command2_Click()
Dim b(100, 1000)
Dim i As Long, j As Long
For i = 1 To 100
'创建多线程 xh i,1000
Next
If 所有线程执行完毕 Then
MsgBox "所有线程执行完毕"
Else
MsgBox "有未执行完毕线程"
End If
End Sub
Function xh(ii As Long, jj As Long) As Long
For ii = 1 To jj
b(ii, jj) = ii * jj
Next
End Function
线程之间无联系 这个应用比较简单实际 没弄过多线程搞不定 求大神出手