建議跨檔案、跨工作表,在使用物件時都要指定好父物件是誰
不然excel預設是執行當下active的物件
Sub test()
Dim wb As Workbook, wb2 As Workbook, sh1 As Worksheet
Set wb = Workbooks("A")
Set sh1 = wb.Worksheets("C")
With sh1
Set wb2 = Workbooks.Open( _
Filename:=.Range("C36").Value & "\" & .Range("D36").Value)
wb2.Sheets("工作表3").Range("A:E").copy Destination:=.Range("A1")
End With
End Sub