I would like to copy some data in a workbook (which will always have the same name: NEW LATEST Loanbook) and copy it in the current workbook I am using. This is the code I have for now:
I have an error at line 3: Workbooks.Open The file I am trying to open is an xlsm file.
Do you have any idea how I can paste it correctly to the other workbook I am using in the correct sheet ?
Set x = Workbooks.Open("G:\Shared drives\Reporting\Power BI Source Files- DO NOT TOUCH\Loanbook\LATEST NEW Loanbook")
Workbooks.Open("G:\Shared drives\Reporting\Power BI Source Files- DO NOT TOUCH\Loanbook\LATEST NEW Loanbook").Activate
x.Sheets("Payment Holidays").Range("A1:G55").Select
Selection.Copy
Set y = ThisWorkbook
ThisWorkbook.Activate
ThisWorkbook.Sheets("RAW Payment Holidays").Range("A1:G55").PasteSpecial Paste:=xlPasteValues
End Sub
.xlsm
extenstion to your.Open
method – Dean