Error Messages/43504
Example error messages
- The following error occurred when calling the obj->Add method using COM: The object invoked has disconnected from its clients
Description
A diverse set of error messages can occur after the colon. In all cases, Windows has reported a problem during a COM method invocation. The method name is given in the error message. In almost all cases, whatever is going on depends on the specifics of the object you are using, how it behaves, and what operations you've performed on it.
The object invoked has disconnected from its clients
This means that the COM object that you are calling has terminated execution before the indicated call.
One situation that can result in this case is a call such as the following.
SpreadsheetOpen("Book1.xls")->Worksheets->Add()
The problem here is that workbook returned by SpreadsheetOpen is released after the <call>Worksheets property returns, because there is no variable holding it. When Analytica releases the workbook returned by SpreadsheetOpen, and if no other application (such as Excel itself) is also holding that workbook object, the workbook is closed. By the time Add() is called, the underlying workbook has closed so the object disconnects.
Enable comment auto-refresher