Same name macros - One in XLA and the other in COM AddIn

A

abhimanyu

Hi,

I have created a COM addin for Excel 2003 using C#. I have an
automation addin class built into this addin that is displayed in the
Tools >> AddIns dialog. The automation addin contains some custom
methods like ISVALID(...)

The problem is that a separate XLA file loads with the addin and it
has the same method inside it (ISVALID(..)). In the Insert >> Function
dialog I have two different categories of functions "V11 Functions"
and "V12 Functions" but both have the same function names. Now when I
insert a function by typing its name in the cell (=ISVALID(B2)) it
picks it from "V11 Functions". I have to manually type
"=V12FunctionsProgID.ISVALID(B2)" to call in from "V12 Functions"
category.

Is there a way to rectify this problem by setting a preference on
which category will be used OR by inserting the functions with FULL
NAME (with ProgID)? If I insert using FULLNAME it works but changes to
short name automatically when I press enter. If again I press F2 in
cell and press enter it takes the V11 one.

Any help will be greatly appreciated

Thanks
Abhimanyu
 
P

Peter T

AFAIK there is no way to fully resolve the ambiguity problem you describe.
Best avoid similarly named functions in addins.

Regards,
Peter T
 

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