I'm using Excel in Microsoft 365 and I have several UDFs written in MS VBA and saved in a *.xla file located in C:\Users\username\AppData\Roaming\Microsoft\AddIns. Additionally, this file has been successfully loaded as an add-in because I can see it in the Add-ins window made available on the Developer tab's "Excel Add-ins" icon. I can also view the code in the module from the Visual Basic window.
The problem is all instances of a UDF have the following error: #NAME?.
However, if I open the *.xla file first (which results in a completely blank spreadsheet i.e, no cells) and then open a saved spreadsheet containing my UDFs, all of the UDFs work fine. While this is a workaround, it is a bit clumsy and I would like a cleaner solution.
My expectation was because my *.xla file was loaded as an Excel Add-in it would naturally be available to use in any Excel spreadsheet.
I also tried unchecking the Add-in I created when the spreadsheet was open but when I re-opened the spreadsheet, each instance of a UDF is altered with the path to the *.xla file mentioned above. New instances of a UDF will not work unless I enter the full path. For example:
='C:\Users\username\AppData\Roaming\Microsoft\AddIns\myAddIn.xla'!UDFname(E9,E10).
I was curious about this issue and went back to the website of the late but great Chip Pearson. Following the instructions from his page, I was able to accomplish what you are stuck on. Looking at your question (well done btw), it does look like you've saved it to the proper location, but i would triple check as that seems most probable for an error.
For what it's worth, here's what I was able to do to get a UDF to appear as a recognized formula from an initial load blank file:
xlashould be, so I copied Chip's file therethanksPearsonand hit save. The entire code from the module is saved below from thexla.=thanksPerason("boom")performed as expected.Remember Pearson
In case it's not obvious, I'm a fan of the work of Chip Pearson who died way too early in 2018 due to a car accident. If you read through his website, it is absolutely a masterpiece of well-written comprehensible explanations with examples that are hailed as immeasurably more useful than anything Microsoft ever produced. Anyway. Just a guy worth giving a shout-out to every now and then considering the amount of value he delivered to the world.