Start Excel from another program / command line throws exception

X

XL-Dennis

Hi,

I got a managed COM add-in for Excel which is available in the VBE when it's
loaded. Everything works as expected when Excel is loaded the normal way. But
when a new instance of Excel is created from another program or when it's
started with the Command line the following exception is throwned:

System.Runtime.InteropServices.COMException(0x800A03EC): Exception from
HRESULT: 0x800A03EC at Excel._Application.get_VBE() at
NETColLibrary.AddinModule.Add_Menu_Items()

Can someone shed some lights over this issue and also guide me how to solve
it?

---------------
With kind regards,
Dennis
Weekly Blog .NET & Excel: http://xldennis.wordpress.com/
My English site: http://www.excelkb.com/default.aspx
My Swedish site: http://www.xldennis.com/
 
A

Andrei Smolin [Add-in Express]

Hi Dennis,

What event do you use to add your menu items? Can you move this code to, say
Workbook_Activate?

If the problem persists, can you create a sample project that reproduce the
problem and send it to me
for testing?

Regards from Belarus (GMT+2),

Andrei Smolin
Add-in Express Team Leader
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top