|
楼主 |
发表于 2010-4-6 16:34
|
显示全部楼层
[广告] VBA代码宝 - VBA编程加强工具 · VBA代码随查随用 · 内置多项VBA编程加强工具 ★ 免费下载 ★ ★ 使用手册★
原帖由 lbl016 于 2010-4-5 21:45 发表
Sub test2()
Dim Arr1, Arr2
Dim N As Integer
Arr1 = Split("A,B,C,D", ",")
Arr2 = Split("C,D,B,A", ",")
Application.ScreenUpdating = False
For N = LBound(Arr1) To UBound(Arr1)
With Worksheets ...
Sub test2()
Dim Arr1, Arr2
Dim N As Integer
Arr1 = Split("A,B,C,D", ",")
Arr2 = Split("C,D,B,A", ",")
Application.ScreenUpdating = False
For N = LBound(Arr1) To UBound(Arr1)
With Worksheets("目标表")
Worksheets("源表").Columns(Arr1(n)).Copy
.Columns(Arr2(n)).Insert
End With
Next N
Application.ScreenUpdating = true
End Sub |
|