COMException (0x800A03EC) on workbook.VBProject.VBComponents

F

FaithRaven

Hello

I am getting:

System.Runtime.InteropServices.COMException (0x800A03EC): Exception from
HRESULT: 0x800A03EC at
Microsoft.Office.Interop.Excel.WorkbookClass.get_VBProject()

On the office 2007 addin I've built.

The gotha is that the client has already enabled the Trust Access to VBA in
Excel 2007 and also this is happening only to a select number of clients, not
all of them.

Any other ideas why this might occur ? Below is the full code snippet:
VBComponent result = null;

if (workbook.VBProject.VBComponents.Count > 0)
{
foreach (VBComponent macroModule in
workbook.VBProject.VBComponents)
{
if (macroModule.Name == sheet.Name)
{
result = macroModule;
break;
}
}
}

Thanks
 

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