请问如何用VBA让EXCEL同时或者顺序执行多个任务?
请问如何用VBA让EXCEL同时或者顺序执行多个任务?
日期:2016-10-30 20:03:03 人气:1
要顺序执行。
Sub 宏1()Dim arr() As Variantarr = Array(6, 8, 11, 15)lastrow = Cells(Rows.Count, 1).End(3).RowFor i = 0 To 3 For j = 1 To lastrow Cells(j, i+2) = Cells(j, 1) * arr(i) Next MsgBox ("乘以" & ar(i))NextEnd Sub