Macros across multiple files

G

Guest

I have 6 files that i wish to open and run a macro on. I have set up another
file that contains a macro that is intended to runs all six. However it runs
through the macro in the first file and then finishes without starting the
second file.

I'm quite new to macros and obviously missing something here. Help !

Sub Update_PFT_Reports()
'
' Update_PFT_Reports Macro
' Macro recorded 01/06/2006 by Peter Hine
' ChDir "\\Havuksfp01\havantreporting\Daily_reporting\Current"
' Keyboard Shortcut: Ctrl+Shift+U
'
Workbooks.Open Filename:= _
"\\Havuksfp01\havantreporting\Daily_reporting\Current\Consolidated
PFT Daily report back up data.xls"
Application.Run _
"'Consolidated PFT Daily report back up data.xls'!Update_and_save"
Workbooks.Open Filename:= _
"\\Havuksfp01\havantreporting\Daily_reporting\Current\Blocks &
Ultronics Daily report back up data.xls"
Application.Run _
"'Blocks & Ultronics Daily report back up data.xls'!Update_and_save"
Workbooks.Open Filename:= _
"\\Havuksfp01\havantreporting\Daily_reporting\Current\4V3 & 4V5
Daily report back up data.xls"
Application.Run _
"'4V3 & 4V5 Daily report back up data.xls'!Update_and_save"
Workbooks.Open Filename:= _
"\\Havuksfp01\havantreporting\Daily_reporting\Current\Batch & Props
Daily report back up data.xls"
Application.Run _
"'Batch & Props Daily report back up data.xls'!Update_and_save"
Workbooks.Open Filename:= _
"\\Havuksfp01\havantreporting\Daily_reporting\Current\Hose Daily
report back up data.xls"
Application.Run _
"'Hose Daily report back up data.xls'!Update_and_save"
Workbooks.Open Filename:= _
"\\Havuksfp01\havantreporting\Daily_reporting\Current\MMVP Daily
report back up data.xls"
Application.Run _
"'MMVP Daily report back up data.xls'!Update_and_save"
End Sub
 
G

Guest

hi,
it would have helped if you had posted your code.
I did this once with 12 files.
I created a Master file that contained all of the 12 macros. i created a
13th macro that....
opened file 1 then called the macro that was supose to run in that file.
after running macro1 in file 1, the 13th macro saved and closed file1. it
then open file 2 and called macro2 and so on.

not that much help but maybe it'll give you the general idea.

regards
FSt1
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top