This is a bit long winded but hopefully makes some form of sense...<?xml:namespace prefix = o ns = "urn:schemas-microsoft-comfficeffice" /><o></o>
<o></o>
Background<o></o>
<o></o>
Every month, my team are required to distribute 7 excel based Management Information reports (via creating a new tab in 7 separate workbooks).<o></o>
<o></o>
The data for the 7 reports originates from another 4 separate Workbooks.<o></o>
<o></o>
Until recently the job was done manually (i.e. updating pivots, copy, paste, etc...).<o></o>
<o></o>
I have attempted to automate the process, and have got to the point where the 4 Data Workbooks contain sufficient marcos to complete the monthly reports relevant to the data contained in each Data workbook.<o></o>
<o></o>
Each of the 4 Data workbooks contains its own Master Macro, which runs between 2 and 4 macros depending on which Workbook is being worked on. <o></o>
<o></o>
None of the marcos are particularly complicated (updating pivots, open an existing workbook, creating a new tab, copy, paste, format, save, close kind of thing) and my VBA ability is honestly little more than tweaking my recorded macros through trial and error until the required task gets done. <o></o>
<o></o>
Now my problem....<o></o>
<o></o>
I am currently trying to create a Master Master Macro so to speak, which will allow people to click one button to complete all 7 MI reports.<o></o>
<o></o>
To do this, I have created a new workbook (short name MMRM) and written 4 macros to open each of the 4 Data Workbooks and run the embedded Master Macros.<o></o>
Then, still in MMRM workbook, I have written the Master Master Macro, to run the 4 aforementioned macros located in the MMRM workbook.<o></o>
<o></o>
I have assigned the Master Master Macro to a button...When clicked, the first of the 4 Macros runs fine, but then instead of going on to run the next macro, the Master Master Macro ends (not stalls...ends...there is no error message and all cells become active again...).<o></o>
<o></o>
When I run the Macros individually in MMRM, each of them works perfectly and the corresponding MI reports get created....<o></o>
<o></o>
The code for the Master Master Macro is pasted below.
Sub UpdateAll()
'
' UpdateAll Macro
' Macro recorded 06/08/2010 by Simon C
'
Sheets("Sheet1").Visible = True
Application.Run "'Monthly Monitoring Reports Master.xls'!RunMM"
Application.Run "'Monthly Monitoring Reports Master.xls'!RunTR"
Application.Run "'Monthly Monitoring Reports Master.xls'!RunLD"
Application.Run "'Monthly Monitoring Reports Master.xls'!RunIM"
Sheets("Sheet1").Visible = False
Sheets("Monthly Monitoring Reports").Select
Range(A1).Select
'
End Sub
<o></o>
<o></o>
As all the other macros run normally when looked at individually, I haven't added their code, in case my issue a well know problem with an easy fix. Any ideas? <o></o>
<o></o>
Thanks. <o></o>
<o></o>
Background<o></o>
<o></o>
Every month, my team are required to distribute 7 excel based Management Information reports (via creating a new tab in 7 separate workbooks).<o></o>
<o></o>
The data for the 7 reports originates from another 4 separate Workbooks.<o></o>
<o></o>
Until recently the job was done manually (i.e. updating pivots, copy, paste, etc...).<o></o>
<o></o>
I have attempted to automate the process, and have got to the point where the 4 Data Workbooks contain sufficient marcos to complete the monthly reports relevant to the data contained in each Data workbook.<o></o>
<o></o>
Each of the 4 Data workbooks contains its own Master Macro, which runs between 2 and 4 macros depending on which Workbook is being worked on. <o></o>
<o></o>
None of the marcos are particularly complicated (updating pivots, open an existing workbook, creating a new tab, copy, paste, format, save, close kind of thing) and my VBA ability is honestly little more than tweaking my recorded macros through trial and error until the required task gets done. <o></o>
<o></o>
Now my problem....<o></o>
<o></o>
I am currently trying to create a Master Master Macro so to speak, which will allow people to click one button to complete all 7 MI reports.<o></o>
<o></o>
To do this, I have created a new workbook (short name MMRM) and written 4 macros to open each of the 4 Data Workbooks and run the embedded Master Macros.<o></o>
Then, still in MMRM workbook, I have written the Master Master Macro, to run the 4 aforementioned macros located in the MMRM workbook.<o></o>
<o></o>
I have assigned the Master Master Macro to a button...When clicked, the first of the 4 Macros runs fine, but then instead of going on to run the next macro, the Master Master Macro ends (not stalls...ends...there is no error message and all cells become active again...).<o></o>
<o></o>
When I run the Macros individually in MMRM, each of them works perfectly and the corresponding MI reports get created....<o></o>
<o></o>
The code for the Master Master Macro is pasted below.
Sub UpdateAll()
'
' UpdateAll Macro
' Macro recorded 06/08/2010 by Simon C
'
Sheets("Sheet1").Visible = True
Application.Run "'Monthly Monitoring Reports Master.xls'!RunMM"
Application.Run "'Monthly Monitoring Reports Master.xls'!RunTR"
Application.Run "'Monthly Monitoring Reports Master.xls'!RunLD"
Application.Run "'Monthly Monitoring Reports Master.xls'!RunIM"
Sheets("Sheet1").Visible = False
Sheets("Monthly Monitoring Reports").Select
Range(A1).Select
'
End Sub
<o></o>
<o></o>
As all the other macros run normally when looked at individually, I haven't added their code, in case my issue a well know problem with an easy fix. Any ideas? <o></o>
<o></o>
Thanks. <o></o>