View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
N10 N10 is offline
external usenet poster
 
Posts: 141
Default Creating a macro that opens and runs multiple workbooks and macros


wrote in message
ups.com...
I have created 10 separate workbooks, each with its own macro. I want
to create one macro that opens each workbook, runs the macro, then
closes the workbook and the moves to the next workbook.

Currently, my code is simple.

Workbooks.open filename
application.run filename!macro
workbook.close

Workbooks.open filename
application.run filename!macro
workbook.close

etc...

the macro is stopping after it completes the first macro.

Any help would be appreciated.



HI

Have you tried putting the macro you want to run in each seprate workbook in
the work book open events of those objects.

The macros would then run automatically everytime the workbook was opened.



N10 :)