IntelliSense error message

98 views
Skip to first unread message

FastExcel

unread,
Dec 5, 2019, 10:56:04 AM12/5/19
to Excel-DNA
I get this error message from DNA Intellisense

"Runtime [Error] Unhandled exception in async delegate call. : COMException - Invalid index. (Exception from HRESULT: 0x8002000B (DISP_E_BADINDEX))"

But I only get it when loading the Intellisense xll using VBA Application.RegisterXLL from the VBA Workbook Open event.
(The workbook contains the intellisense xml)

Once the workbook has opened RegisterXLL works OK. Looks like some kind of sequencing problem.

Caio Proiete

unread,
Dec 5, 2019, 11:24:07 AM12/5/19
to exce...@googlegroups.com

--
You received this message because you are subscribed to the Google Groups "Excel-DNA" group.
To unsubscribe from this group and stop receiving emails from it, send an email to exceldna+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/exceldna/efd201a7-fd03-432f-9af7-19ee4cb27254%40googlegroups.com.

Govert van Drimmelen

unread,
Dec 7, 2019, 4:40:18 AM12/7/19
to Excel-DNA
Hi Charles,

I could sometimes recreate this yesterday, but not today !?

The error is triggered because we are registering the workbook to be examined for functions info, but then it is (unexpectedly) not found in the Application.Workbooks collection soon after. The Invalid Index is the workbook name not being found in the Workbooks collection.
It would not be hard to remove the error report in this case, but I would rather understand the behaviour a bit better first.

When I had trouble, it was in the context of Excel crashing (due to IntelliSense add-in being re-loaded unexpectedly) and then leaving recovery files. It might be that these were problematic.

Do you always see this when you have the RegisterXLL in a Workbook_Open, or only sometimes?
Could it be in a context where you have recovery files, or RegisterXLL is running with the IntelliSense already loaded (from another workbook or automaticallly)?

-Govert

FastExcel

unread,
Dec 11, 2019, 11:39:43 AM12/11/19
to Excel-DNA
Hi Govert,

I will send you a workbook to repro.

It does not happen if the workbook is an addin, or if you double-click the workbook to open it, only fails when you start Excel and then open the workbook.
The workbook contains intellisense XML and some ribbon xml

-Charles
Reply all
Reply to author
Forward
0 new messages