Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Addin function distribution problem

Status
Not open for further replies.

itn04

IS-IT--Management
Aug 20, 2004
9
US
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.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top