Fixing Links To UDFs in Addins
Introduction
Excel has a host of built-in functions to help you do your computations. But sometimes you need to write your own functions using VBA. These functions are called "User Defined Functions" (UDF). UDFs typically are placed in addins. As long as the addin is installed, the UDFs work as expected. You get into trouble when the location of the addin changes, for example because you have distributed the Addin to your co-workers and they have installed it to their local user addin folder (which is different for each user!).
As soon as a file which uses the UDF is opened on a system that uses a different addin path, all cells that use your UDF show #NAME! errors. Also, the complete path to the original location of the add-in is shown in each formula:
='C:\data\FixLink2UDF.xla'!UDFDemo(A1,A2)
This article describes a couple of ways to avoid/resolve this situation.
Contents
- Fix #Name! Errors
- Detecting Workbook Opening
- Processing Newly Opened Workbook
- Handle Workbooks Opened From Explorer
Frequently asked Questions
What are User Defined Functions (UDFs) in Excel?
Where are UDFs typically placed in Excel?
What problem occurs when the location of an addin containing UDFs changes?
Why do cells show #NAME! errors when a UDF addin path changes?
How does Excel display the path to the original addin location in formulas?
What is an example of a formula showing a UDF with a full addin path?
What does this article describe regarding UDF addin path issues?
How can you avoid or resolve issues with broken links to UDFs in addins?
What happens when a file using a UDF is opened on a system with a different addin path?
Why is it important to manage addin paths for UDFs in Excel?
