I have an open workbook "Stock Analysis.xlsm. I need a macro in it that will open another dynamic, (Cell B1 in Stock Analysis), workbook and copy data from the "Summary" worksheet and paste it into the worksheet "Summary" in the Stock Analysis workbook. Once copied then close down the dynamic worksheet.
Cell B1 = TLS
file to open TLS.xlsx
I have tried fgor hours attempting this.
Sub OpenCopyPaste()
Workbooks.Open "C:\Users\61458\Desktop\TEST\Windows32\data\" & Range("B1" & i)
ActiveWorkbook.Worksheets("Summary").Range("A1:P2").Copy
Workbooks("Stock Analysis.xlsm").Worksheets("Summary").Range("a22:d22").PasteSpecial Paste:=xlPasteValues
End Sub
Bookmarks