Hi Oscar,
I think the COM add-in you are loading, is loading after Excel has complete its ‘startup’.
The IDTExtensibility2 interface that the COM add-ins implement is quite generic, so different application might use it differently.
I suspect a ‘normal’ (non-xll based) COM add-in that is registered with Excel will have an initialization while Excel starts, and might then have OnStartupComplete called after that.
But for our case it’s hard to know where in the Excel ‘startup’ sequence the .xll AutoOpen runs, and when the COM add-in loads.
Why is this event interesting to you?
Perhaps you can get use OnConnection event, or I can suggest another plan.
-Govert
--
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/590daa28-f053-4ef1-adfa-27b6c5d8e214n%40googlegroups.com.
--------------------------------------------------
Enjoying our project?
Consider supporting its continued development by becoming a GitHub Sponsor.
Your help ensures we can keep improving and assisting you.
--------------------------------------------------
Hi Oscar,
You can queue some work to run after the load is complete, by using ExcelAsyncUtil.QueueAsMacro like this
public class AddIn : IExcelAddIn
{
public void AutoOpen()
{
ExcelAsyncUtil.QueueAsMacro(() =>
{
Excel(xlcAlert, "Hello from after the add-in load!");
});
}
public void AutoClose()
{
To view this discussion on the web visit https://groups.google.com/d/msgid/exceldna/2b6d5e37-b03a-499d-ac10-61813ee41b45n%40googlegroups.com.
Hi Oscar,
If you want to show a modal dialog, you can run that from the ExcelAsyncUtil.QueueAsMacro.
If you need a dialog that stays around, I would suggest making a Custom Task Pane – that seems to integrate into the window handling a bit better.
To view this discussion on the web visit https://groups.google.com/d/msgid/exceldna/1fa0e00c-f0da-4763-95bd-7af1654a9bf0n%40googlegroups.com.