Ignoring a runtime error

G

garygoodguy

Hi,

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

What I'm wanting to do is to have another separate workbook tha
consolidates all of these 7 workbooks into one consolidated total. To d
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 (an
also the mapping workbook) in the background so that the cells wil
update? Correct? Is this the best way to go about it? Do we have to hav
all of these workbooks open for data to update?

Also, if this is true, then I will need to close all hidden workbooks i
the background when the consolidated workbook is closed. The proble
comes in when each of the 7 workbooks closes their is vba line tha
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
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 o
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 continu
on?

Sorry for the long-winded intro, but needed to detail this.
Thanks in advance
 
G

garygoodguy

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

Thanks anyway.
 

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