ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   EZ - Pull data from another workbook (https://www.excelbanter.com/excel-programming/384297-ez-pull-data-another-workbook.html)

Brad

EZ - Pull data from another workbook
 
I have retrieved the name of another workbook with

OLD = ActiveWorkbook.Name

When I go back to the workbook I am actually running the Macro in, how do I
copy data from OLD to be able to paste into the active workbook? The answer
should be of this sort (which don't work):

Windows(OLD).Range("C5").Copy
Workbooks(OLD).Range("C5").Copy

TIA, Brad

Tim Williams

EZ - Pull data from another workbook
 
workbooks(OLD).sheets("sheetName").range("A1").cop y _
activeworkbook.sheets("otherSheet").range("A1")


--
Tim Williams
Palo Alto, CA


"Brad" wrote in message ...
I have retrieved the name of another workbook with

OLD = ActiveWorkbook.Name

When I go back to the workbook I am actually running the Macro in, how do I
copy data from OLD to be able to paste into the active workbook? The answer
should be of this sort (which don't work):

Windows(OLD).Range("C5").Copy
Workbooks(OLD).Range("C5").Copy

TIA, Brad





All times are GMT +1. The time now is 04:51 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com