Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default Macros across multiple files

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\Curr ent"
' Keyboard Shortcut: Ctrl+Shift+U
'
Workbooks.Open Filename:= _
"\\Havuksfp01\havantreporting\Daily_reporting\Curr ent\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\Curr ent\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\Curr ent\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\Curr ent\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\Curr ent\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\Curr ent\MMVP Daily
report back up data.xls"
Application.Run _
"'MMVP Daily report back up data.xls'!Update_and_save"
End Sub
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,942
Default Macros across multiple files

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

"peterhine21" wrote:

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\Curr ent"
' Keyboard Shortcut: Ctrl+Shift+U
'
Workbooks.Open Filename:= _
"\\Havuksfp01\havantreporting\Daily_reporting\Curr ent\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\Curr ent\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\Curr ent\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\Curr ent\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\Curr ent\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\Curr ent\MMVP Daily
report back up data.xls"
Application.Run _
"'MMVP Daily report back up data.xls'!Update_and_save"
End Sub

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
view multiple files in multiple windows on multiple screens. tcom Excel Discussion (Misc queries) 7 September 15th 05 09:35 PM
How can I view files chronologically when opening multiple files Stevilsize Excel Discussion (Misc queries) 3 July 26th 05 12:49 AM
Macros to Organize the Data from multiple files to one file TEAM[_3_] Excel Programming 1 July 19th 05 09:25 PM
Multiple persional.xls files making macros NOT work! aiyer[_39_] Excel Programming 3 August 16th 04 11:32 PM
Import multiple files macro can't find files Steven Rosenberg Excel Programming 1 August 7th 03 01:47 AM


All times are GMT +1. The time now is 01:12 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"