I have an Excel addin that contains a function. When I use the function in a workbook on my machine it works great. But when another user that has the addin installed on their machine opens the workbook the function is linked to the .xla on my machine. I also have a toolbar that is distributed with this addin and the macros that are ran from the buttons on the toolbar work just fine. What am I doing wrong with the function? Here is the code:
************************
Public Function SFPDIFF(beg_value As Currency, _
end_value As Currency, _
Optional threshold As Currency) As Double
If beg_value = 0 Then
If end_value = 0 Then
num1 = 0
Else
num1 = 1
End If
Else
num1 = (end_value - beg_value) / beg_value
End If
If Abs(num1) > threshold Then
SFPDIFF = num1
Else
SFPDIFF = 0
End If
End Function
**********
Thanks in advance.
************************
Public Function SFPDIFF(beg_value As Currency, _
end_value As Currency, _
Optional threshold As Currency) As Double
If beg_value = 0 Then
If end_value = 0 Then
num1 = 0
Else
num1 = 1
End If
Else
num1 = (end_value - beg_value) / beg_value
End If
If Abs(num1) > threshold Then
SFPDIFF = num1
Else
SFPDIFF = 0
End If
End Function
**********
Thanks in advance.