Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Junior Member
 
Posts: 29
Default Ignoring a runtime error

Hi,

I have 7 workbooks (all the same template structure). I also have a mapping workbook that acts as a data source for each. So when any of the 7 workbooks are opened, the mapping workbook opens (and remains open) in the background. When the template workbooks are closed some more vba closes the mapping in the background without saving.

What I'm wanting to do is to have another separate workbook that consolidates all of these 7 workbooks into one consolidated total. To do this I'll use the consolidate function in Data -- Consolidate.

How can I do this? I'm assuming I will have to open all 7 workbooks (and also the mapping workbook) in the background so that the cells will update? Correct? Is this the best way to go about it? Do we have to have all of these workbooks open for data to update?

Also, if this is true, then I will need to close all hidden workbooks in the background when the consolidated workbook is closed. The problem comes in when each of the 7 workbooks closes their is vba line that wants to close the mapping workbook. So when the first workbook closes, it will close the mapping workbook, but for the remaining 6 I will get a runtime error because the mapping workbook has now been closed.

How do I get around this? Will I have to put some vba code in each of the 7 workbooks to say, if error message X, then ignore, else...? If so, does anyone know how to ignore a specific runtime error and continue on?

Sorry for the long-winded intro, but needed to detail this.
Thanks in advance.
  #2   Report Post  
Junior Member
 
Posts: 29
Default

Don't worry.
Have realised that the in-built Excel consolidation tool dynamically updates without having to open the source workbooks.

Thanks anyway.

Quote:
Originally Posted by garygoodguy View Post
Hi,

I have 7 workbooks (all the same template structure). I also have a mapping workbook that acts as a data source for each. So when any of the 7 workbooks are opened, the mapping workbook opens (and remains open) in the background. When the template workbooks are closed some more vba closes the mapping in the background without saving.

What I'm wanting to do is to have another separate workbook that consolidates all of these 7 workbooks into one consolidated total. To do this I'll use the consolidate function in Data -- Consolidate.

How can I do this? I'm assuming I will have to open all 7 workbooks (and also the mapping workbook) in the background so that the cells will update? Correct? Is this the best way to go about it? Do we have to have all of these workbooks open for data to update?

Also, if this is true, then I will need to close all hidden workbooks in the background when the consolidated workbook is closed. The problem comes in when each of the 7 workbooks closes their is vba line that wants to close the mapping workbook. So when the first workbook closes, it will close the mapping workbook, but for the remaining 6 I will get a runtime error because the mapping workbook has now been closed.

How do I get around this? Will I have to put some vba code in each of the 7 workbooks to say, if error message X, then ignore, else...? If so, does anyone know how to ignore a specific runtime error and continue on?

Sorry for the long-winded intro, but needed to detail this.
Thanks in advance.
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
runtime error 13 - type mismatch error in Excel 97 on Citrix Kevin Maher Excel Programming 7 March 8th 08 11:48 AM
Sum ignoring cells with error JRD Excel Worksheet Functions 1 December 12th 07 05:27 PM
Excel 2003 Macro Error - Runtime error 1004 Cow Excel Discussion (Misc queries) 2 June 7th 05 01:40 PM
Capturing an error and then ignoring it cskgg Excel Programming 1 July 23rd 04 10:48 AM
Syntax Error Runtime Error '424' Object Required sjenks183 Excel Programming 1 January 23rd 04 09:25 AM


All times are GMT +1. The time now is 05:33 AM.

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"