Hi,
I would like to copy data from a different workbook in a macro. When I do this, do you know how I can reference the other workbook? Being an amatuer, I have the following:
C:\Users\Andrew\Desktop\[Book1.xlsx]Sheet1.Sheets("Sheet1").Range("A1:A5").Value = C:\Users\Andrew\Desktop\[Book2.xlsx]Sheet1.Sheets("Sheet1").Range("A1:A5").Value
This gives me an error. Any idea of how I can do this? Basically copy cells A1:A5 in one spreadsheet into another?
Also, if possible, if 'book2' is closed and the macro is run from book 1, can a macro open book 2 then copy the data in?
Thanks!
I would like to copy data from a different workbook in a macro. When I do this, do you know how I can reference the other workbook? Being an amatuer, I have the following:
C:\Users\Andrew\Desktop\[Book1.xlsx]Sheet1.Sheets("Sheet1").Range("A1:A5").Value = C:\Users\Andrew\Desktop\[Book2.xlsx]Sheet1.Sheets("Sheet1").Range("A1:A5").Value
This gives me an error. Any idea of how I can do this? Basically copy cells A1:A5 in one spreadsheet into another?
Also, if possible, if 'book2' is closed and the macro is run from book 1, can a macro open book 2 then copy the data in?
Thanks!