Hi.
how to copy the book "Origin.xlsx" and tab "Base" for the book "Destination.xlsx" tab within the "Result"?
i'm try this
how to copy the book "Origin.xlsx" and tab "Base" for the book "Destination.xlsx" tab within the "Result"?
i'm try this
Code:
Sub CopySheetBase()
Dim wkbSource As Workbook
Dim wkbDest As Workbook
Dim shtToCopy As Worksheet
Set wkbSource = Workbooks.Open("C:\Origin.xlsx")
Set wkbDest = Workbooks.Open("C:\Origin.xlsx")
Set shtToCopy = wkbSource.Sheets("Destination.xlsx")
shtToCopy.copy wkbDest.Sheets("Result")
End Sub