ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   open files run macro (https://www.excelbanter.com/excel-discussion-misc-queries/191174-open-files-run-macro.html)

Steve

open files run macro
 
I want to run a macro (sets headers/footers) on every workbook in a directory
structure and have the post-macro worbook saved. Thanks.

Ron de Bruin

open files run macro
 
Hi Steve

Use this macro
http://www.rondebruin.nl/copy4.htm

Read the examples below the macro


--

Regards Ron de Bruin
http://www.rondebruin.nl/tips.htm


"Steve" wrote in message ...
I want to run a macro (sets headers/footers) on every workbook in a directory
structure and have the post-macro worbook saved. Thanks.


Steve

open files run macro
 
Is there a way to process workbooks in all sub-folders, too?



"Ron de Bruin" wrote:

Hi Steve

Use this macro
http://www.rondebruin.nl/copy4.htm

Read the examples below the macro


--

Regards Ron de Bruin
http://www.rondebruin.nl/tips.htm


"Steve" wrote in message ...
I want to run a macro (sets headers/footers) on every workbook in a directory
structure and have the post-macro worbook saved. Thanks.



Ron de Bruin

open files run macro
 
Yes this is possible

I not have time now to build a example but you can steal the code to build a array with all files
in the root and sub folders on this page (download the example workbook)
http://www.rondebruin.nl/fso.htm

If you have problems post back and I see if I have time this weekend


--

Regards Ron de Bruin
http://www.rondebruin.nl/tips.htm


"Steve" wrote in message ...
Is there a way to process workbooks in all sub-folders, too?



"Ron de Bruin" wrote:

Hi Steve

Use this macro
http://www.rondebruin.nl/copy4.htm

Read the examples below the macro


--

Regards Ron de Bruin
http://www.rondebruin.nl/tips.htm


"Steve" wrote in message ...
I want to run a macro (sets headers/footers) on every workbook in a directory
structure and have the post-macro worbook saved. Thanks.




All times are GMT +1. The time now is 06:58 AM.

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