![]() |
Help with copy an array from one workbook to another
Hi Excel Guru's Thanks so much for all the help so far. I need to copy an b2:I65 from one workbook to another. The workbook with the live data will be closed. I need it to copy into the same cells B2:i65 and write over the dat that is already existing. (What I am doing is displaying months of data in the smae b2:i6 cells. So was going to have buttons across the top with months on them an whatever month is selected then the data in the Master workbook will b copied into the above cells in the slave workbook -- Mikeic ----------------------------------------------------------------------- Mikeice's Profile: http://www.excelforum.com/member.php...fo&userid=2246 View this thread: http://www.excelforum.com/showthread.php?threadid=38372 |
Help with copy an array from one workbook to another
Backup your workbooks before trying this macro. ok let say you want to copy from workbook x.xls which is in "c:\" and file is not opened. you can write a macro to copy data from x.xls to the workbook which as macro using code below. sub macro dim w,n as variant application.displayalerts=false w=activeworkboook.name Workbooks.Open Filename:="c:\x.xls" n=activeworkbook.name range("b2:i65").select selection.copy workbooks(w).activate range("b2").select activesheet.paste workbooks(n).activate activeworkbook.save activeworkbook.close workbooks(w).activate application.displayalerts=true end if -- anilsolipuram ------------------------------------------------------------------------ anilsolipuram's Profile: http://www.excelforum.com/member.php...o&userid=16271 View this thread: http://www.excelforum.com/showthread...hreadid=383727 |
All times are GMT +1. The time now is 02:37 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com