I have inherited a complex system consisting of multiple excel worbooks. My task is to upgrade the system from Excel 2003 to Excel 2010. It all works OK in excel 2003.
Background:
There is a single "processor" workbook that runs throughout the working day - its sole purpose is to open and run other "template" workbooks as and when requested.
These "template" workbooks are not true excel templates. They are .xlsm files, often with multiple worksheets each sheet with hundreds of cells referencing a shed load of UDFs (all held in a massive VBA add in), excel functions and other cells / sheets within the workbook. Once all the workbook cells have been recalculated some, but not all of worksheets are copied to a new workbook using the following command:
The new workbook is tidied up, formatted, saved and closed then the "processor" opens the next "template" and starts again.![]()
Please Login or Register to view this content.
The processor workbook has to run the same template multiple times (albeit with different input parameters) it works OK the first time through but crashes Excel the second time.
The problem:
It manages to create the new book but errors on the sheets.copy command:
Err Nmbr: -2147417848
Err.Desc: Automation error - The object invoked has disconnected from its clients.
Shortly after this, Excels displays the "Microsoft Excel has experienced a problem and needs to close" message. Sometimes it completely freezes, sometimes it just shuts down.
Can anyone explain why this might be?
I have 100 or so templates to upgrade, all with they same basic processing, so need a solution.
Many thanks
Bookmarks