|
2、不理解
1、请测试:
Sub aaa()
Dim arr, i As Long, lr As Long, wk As Workbook
Application.ScreenUpdating = False
i = 2
Do Until Cells(i, 12).Value = ""
lr = i
i = i + 1
Loop
arr = Range("L3:AB" & lr)
With Sheets("销售台帐")
.Range("a" & .Range("a65536").End(3).Row + 1).Resize(lr - 2, UBound(arr, 2)) = arr
End With
Set wk = Application.Workbooks.Open(ThisWorkbook.Path & "\销售台帐.xls")
With wk.Sheets(1)
.Range("a" & .Range("a65536").End(3).Row + 1).Resize(lr - 2, UBound(arr, 2)) = arr
End With
wk.Close True
Application.ScreenUpdating = True
MsgBox "保存完毕"
End Sub |
|