No, using the C API in a COM callback is probably not a good idea. Just use the COM object model there.
-Govert
Inside a Application_WorkbookAfterSave event handler, is it surprising that I can not use XlCall.Excel( XlCall.xlfSelection )?
--
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 visit https://groups.google.com/d/msgid/exceldna/57c0248a-6f33-489f-b484-b64db097d87dn%40googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/exceldna/6758139e-9911-4479-89b8-10d011020127n%40googlegroups.com.
QueueAsMacro run the delegate on the main thread, but if you show a dialog or something, that might not be running on the main thread.
But in your case I think the problem is the workbook being closed already.
Capturing the name string and then looking for it in the COM collections again when the delegate runs is a good plan.
-Govert
To view this discussion visit https://groups.google.com/d/msgid/exceldna/83de5778-6ade-4324-985b-a19eb7b6d578n%40googlegroups.com.