ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Create summary WB (https://www.excelbanter.com/excel-programming/363645-create-summary-wb.html)

GregR

Create summary WB
 
I have a Dir with many SubDir. I want to open the file in each SubDir
which has been modified last and copy Sheet(1) to a summary WB. Rename
each new sheet in the summary WB with the first 6 characters of the
SubDir. In turn, close each WB, after it has been copied and the
summary sheet renamed without saving it. The final result will be a
summary WB with 1 sheet for each project. Your help is very much
appreciated. TIA

Greg


AA2e72E

Create summary WB
 
Some hints:

1. Use Scripting.FileSystemObject to recurse through your sub folders, to
enumerate and identify the last modified workbook in each.

2. Use Excel.Application to create your Summary workbook and to loop through
your list of workbooks from step 1.

3. Use Move (see help) to move Sheet(1) to the summary WB: take care not to
save the WB you are copying from.


GregR

Create summary WB
 
I know the steps, but not the proper code to accomplish my intended
result.

Greg
AA2e72E wrote:
Some hints:

1. Use Scripting.FileSystemObject to recurse through your sub folders, to
enumerate and identify the last modified workbook in each.

2. Use Excel.Application to create your Summary workbook and to loop through
your list of workbooks from step 1.

3. Use Move (see help) to move Sheet(1) to the summary WB: take care not to
save the WB you are copying from.




All times are GMT +1. The time now is 07:50 PM.

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