我正在尝试将数据从一个工作簿复制到另一个工作簿。在互联网上浏览了一些之后,这是我找到的代码,它会产生运行时错误 1004
Sub Name_Transfer()
Dim wbSource As Workbook
Dim wbDestination As Workbook
'open the source workbook and select the source sheet
Set wbSource = Workbooks.Open( _
Filename:="C:\TestFolder\2013 Cockpit Chart.xls")
'Set the destition workbook variable
Set wbDestination = Workbooks("U:\my documents\ATM Platform 2013\Advanced Team Management.xlsm")
'copy the source range
wbSource.Sheets("Sheet1").Range("A2:B4").Copy
'paste the value at E9
wbDestination.Sheets("DataStore").Range("A4:B6").Value = _
wbSource.Sheets("Sheet1").Range("A2:B4").Value
Application.CutCopyMode = False
ActiveWorkbook.Save
End Sub
是什么导致了 1004 错误?可以修复吗?还是有更好的方法来做到这一点?