Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Mass copy of excel docs
I have {30} several documents -- Excel that I want to copy some cells
to a new template. I want to use a macro for this. Any suggestions?? |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Mass copy of excel docs
How can the several documents be identified. To they all start with a
common root word. Are they the only .xls files in a directory. Copy to a new template - do you want to consolidate all on one page Dim bk1 as Workbook, bk as Workbook Dim sName as String, dim rng as Range set bk1 = Workbooks.Add sName = Dir("C:\MyDocs\*.xls") do while sName < "" set bk = Workbooks.Open("C:\MyDocs\" & sName) bk.worksheets(1).Range("A1").Resize(5,5).copy set rng = bk1.Worksheets(1).Cells(rows.count,1).End(xlup)(2) rng.PasteSpecial xlValues bk.close SaveChanges:=False sName = Dir() Loop -- Regards, Tom Ogilvy wrote in message oups.com... I have {30} several documents -- Excel that I want to copy some cells to a new template. I want to use a macro for this. Any suggestions?? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Excel docs not saving as excel docs | Excel Discussion (Misc queries) | |||
i have lost the small + that allows mass copy of formulas in excel | Excel Discussion (Misc queries) | |||
Formula Mass Copy??? | Excel Discussion (Misc queries) | |||
Embedding Word Docs into Excel Worksheets and Then Printing The Word Docs | Excel Worksheet Functions | |||
converting excel docs to word docs | New Users to Excel |