C Add-In clashes with VBA?

A

Anton Kryukov

I am trying to write an Add-In XLL in C that calls functions from the
Analysis ToolPack as user-defined functions, for example

Excel(xlUDF, &xRes, 5, TempStr("COUPPCD"),
TempNum(settle), TempNum(maturity), TempNum(freq),
TempNum(basis));

When macros are disabled, things seem to work fine. However if the
spreadsheet contains enabled VBA functions using the Analysis
ToolPack, things go wild. The first invocation of a ToolPack function
from the C Add-In works fine, but the second time the xRes XLOPER has
the xltype field set to xltypeBool instead of xltypeNum, even though
the Exel function itself returns xlretSuccess.
Any ideas about what's happening?
Thanks

Anton Kryukov
 

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