none
Excel Addin open RRS feed

  • Question

  • Hello,

    I'm using MS Excel 2010. I developed an addin in VBA as an xlam file. The addin contains more than a hundred of user defined functions (UDFs). In Thisworkbook module of the addin, I wrote a Workbook_AddInstall event procedure in which I register all of my UDFs in a function category named "HidroXL" along with their descriptions and arguments.

    When I install the addin, I can see my functions categorized in my custom "HidroXL" category. It works fine. The problem is that when I cexit Excel and restart it, my custom category "HidroXL" is gone and replaced by another xll addin's name. I tried putting the UDF registration codes in Workbook_open and Auto_open subroutines. No success.

    Do Excel loads the installed addin files each time the application starts? Or do I have to write another code for that, for instance in a template workbook?

    Thank you in advance for your kind help.

    Selami

    Tuesday, September 26, 2017 5:28 PM

All replies

  • m,
    re:  developing an add-in

    Questions that may help... 
      Are you using the Application.MacroOptions method to assign the category?
      Are the functions to be called from a worksheet using a formula  or   called by other functions/subs?
      Have you seen/read "Registering a User Defined Function with Excel" by Jan Karel Pieterse at...
      http://www.jkp-ads.com/Articles/RegisterUDF01.asp

    '---
    Jim Cone
    Portland, Oregon USA
    https://goo.gl/IUQUN2 (Dropbox)
    (free & commercial excel add-ins & workbooks)

    • Edited by James Cone Tuesday, September 26, 2017 10:15 PM
    Tuesday, September 26, 2017 10:14 PM
  • Thanks,

    I found a way around my problem. It's solved. 

    I put my registry codes (Application.Macrooptions method) into a Workbook_Open procedure. And wrote an Application.Workbooks.Add statement before registering the functions. The program works very fine.

    Thanks.

    Wednesday, September 27, 2017 5:57 AM
  • Hello Selami,

    Thanks for sharing the solution. I suggest you mark it as answer to close this thread.

    Regards,

    Celeste


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Wednesday, September 27, 2017 8:46 AM
    Moderator