• Moving a UDF from a Workbook to an Add-In (xl97, Win2000)

    Home » Forums » AskWoody support » Productivity software by function » MS Excel and spreadsheet help » Moving a UDF from a Workbook to an Add-In (xl97, Win2000)

    Author
    Topic
    #407393

    I have a UDF that has been residing in a workbook and now I want to move it to an add-in. When I delete the UDF from the workbook, I get a NAME error when I try to use the function. It appears to be looking for the function in the workbook instead of the add-in. Is there a fix for this?

    Viewing 1 reply thread
    Author
    Replies
    • #851773

      how do you open the addin? (you should add it to the addins list (tools, addins) and check it there so it is installed. Then the functions should work. It might be that you have to check them though, if there is a workbook name in front of the functions name, you’ll have to remove that.

      • #851842

        The add-in is installed as you described via ToolsAdd-ins and checking the box. If I change the function name in the workbook and the add-in, Excel executes the function correctly.

        I’ve always noticed that with UDFs, the case of the UDF name (i.e. which letters are capitalized in the name) is determined by your first usage of the UDF in your workbook. This makes me believe that Excel is building a table of UDF names.

        In my current situation, the function name continues to revert to all lower case because that’s how it was originally used in the workbook, even though I’ve deleted the UDF from the workbook, opened the workbook, deleted references to the function, removed the add-in, saved the workbook, and re-installed the add-in all in an attempt to delete this entry from this presumed UDF name table.

        • #852010

          You might try copying all sheets from the workbook to a new workbook (copy them all in one go to avoid links).
          Make sure there are no cells with more than 255 characters in them, those may get truncated and you’ll need to copy the cells instead of the entire worksheet.

        • #852011

          You might try copying all sheets from the workbook to a new workbook (copy them all in one go to avoid links).
          Make sure there are no cells with more than 255 characters in them, those may get truncated and you’ll need to copy the cells instead of the entire worksheet.

        • #852014

          Hi,
          I was actually doing something similar the other day as I had moved a few functions into a dll and I found that I had to remove the function from the workbook, remove all instances of the function from cells in the workbook, save it, close excel and restart, then re-enter the new function. A bit of a pain but it did work.
          Hope that helps.

          • #853620

            I found out that some prior references to the UDF were not removed from the workbook. Once I cleaned all of those up, the add-in worked perfectly. Thanks everyone for your help.

          • #853621

            I found out that some prior references to the UDF were not removed from the workbook. Once I cleaned all of those up, the add-in worked perfectly. Thanks everyone for your help.

        • #852015

          Hi,
          I was actually doing something similar the other day as I had moved a few functions into a dll and I found that I had to remove the function from the workbook, remove all instances of the function from cells in the workbook, save it, close excel and restart, then re-enter the new function. A bit of a pain but it did work.
          Hope that helps.

      • #851843

        The add-in is installed as you described via ToolsAdd-ins and checking the box. If I change the function name in the workbook and the add-in, Excel executes the function correctly.

        I’ve always noticed that with UDFs, the case of the UDF name (i.e. which letters are capitalized in the name) is determined by your first usage of the UDF in your workbook. This makes me believe that Excel is building a table of UDF names.

        In my current situation, the function name continues to revert to all lower case because that’s how it was originally used in the workbook, even though I’ve deleted the UDF from the workbook, opened the workbook, deleted references to the function, removed the add-in, saved the workbook, and re-installed the add-in all in an attempt to delete this entry from this presumed UDF name table.

    • #851774

      how do you open the addin? (you should add it to the addins list (tools, addins) and check it there so it is installed. Then the functions should work. It might be that you have to check them though, if there is a workbook name in front of the functions name, you’ll have to remove that.

    Viewing 1 reply thread
    Reply To: Moving a UDF from a Workbook to an Add-In (xl97, Win2000)

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: