My Excel
addin (XLL AddIn, call it MyAddIn
) is built with C#, ExcelDNA, NetOffice, VS2010. Client has another addin (let's call it B
), I guess it is written in VBA.
Client says B
works fine without MyAddIn
. Once MyAddIn
is installed, B
fails with error:
Error code: 406 Error message: Non-modal forms cannot be displayed in this host application from an ActiveX DLL, ActiveX Control, or Property Page.
I did see this Microsoft resource, but I do not want to just tell the client that B
addin needs changing. I want to do something to avoid this from my side.
Here is the steps reported to see the issue:
- When B addin is installed, it does not make any registry entry for the Microsoft
Excel
. - When
MyAddin
is installed, it makes a registry entry for MicrosoftExcel
. - Registry entries here basically tells that the addin should be opened when
Excel
is launched, soB
addin is not launched,Excel
works fine,MyAddIn
works fine. - Now when
B
addin is launched, it gives the 406 error shown above. - We can ignore the error and keep working with the
B
addin; disablingMyAddIn
is the workaround. - When the
B
addin is launched, we see thatMyAddIn
is loaded first before theB
addin and then get the 406 error. - When we uninstall
MyAddIn
, this error is no longer encountered and everything works fine. - To remove this error, we tried changing the registry order to make the
B
addin always open beforeMyAddin
.- This works, but then this a global change for Microsoft
Excel
, which meansB
addin will always open, even when we launch onlyExcel
. This is not desired, asB
addin then can't let users work with the static data as theB
addin keeps on refreshing real-time. That is the reason theB
addin doesn't make an entry in the registry settings. So registry changes are not an option. We can’t always openB
addin wheneverExcel
is open.
- This works, but then this a global change for Microsoft