我有两个 xls 文件:file1.xls 和 file2.xls
我想将文件“file1.xls”的 sheet1 的内容复制到文件“file2.xls”的 sheet2 中。
考虑类似的事情:
Sub dural()
Dim alpha As Workbook, beta As Workbook
Workbooks.Open Filename:="C:\TestFolder\alpha.xlsm"
Set alpha = ActiveWorkbook
Workbooks.Open Filename:="C:\TestFolder\beta.xlsm"
Set beta = ActiveWorkbook
alpha.Sheets(1).Copy Before:=beta.Sheets(1)
End Sub