試試看這可不可用
<pre class="c" name="code">
Sub Main()
Windows(2).Activate
Sheets(1).Select
Sheets(1).Copy After:=Workbooks("code.xlsm").Sheets(ThisWorkbook.Sheets.Count)
End Sub
doc.xslx 裡的doc夾 copy到 code.xlsm 的last 夾
Sub Macro1()
'
' Macro1 Macro
'
'
Windows("doc.xlsx").Activate
Sheets("doc").Select
Cells.Select
Selection.Copy
Windows("code.xlsm").Activate
Sheets("last").Select
Range("A1").Select
ActiveSheet.Paste
Range("A1").Select
End Sub