![]() |
Same name macros - One in XLA and the other in COM AddIn
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 |
Same name macros - One in XLA and the other in COM AddIn
AFAIK there is no way to fully resolve the ambiguity problem you describe.
Best avoid similarly named functions in addins. Regards, Peter T "abhimanyu" wrote in message ... 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 |
All times are GMT +1. The time now is 11:15 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com