01.
Sub
testsavecopyfile()
02.
Dim
source
As
Range
03.
Dim
target
As
Range
04.
05.
With
Workbooks(
"CopyData.xlsm"
).Sheets(1)
06.
Set
source = .Range(
"a2"
, .Range(
"h"
& .Rows.Count).
End
(xlUp))
07.
08.
End
With
09.
10.
With
Workbooks(
"PasteData.xlsx"
).Sheets(1)
11.
Set
target = .Range(
"a2"
)
12.
13.
End
With
14.
15.
source.Copy
16.
17.
target.PasteSpecial xlPasteValues
18.
Application.CutCopyMode = fasle
19.
20.
End
Sub