Change the name of the VBProject that contains the function from the default
"VBA Project" to something meaningful like "projMathStuff". To do this, open
the project containing the function, go to the Tools menu in VBA, choose
"VBA Project Properties" and change the value of the Name parameter. Now, to
allow other workbooks to call that function, the other workbook needs to set
a reference to the "projMathStuff" project. In the calling workbook, go back
to the Reference dialog and put a check next to the "projMathStuff" item.
With that reference in place, you can call the function as if it were built
in to the workbook:
Res = TheFucntion(1,2,3)
If there is the possibility that more than one workbook may have a function
named TheFunction, you can prefix the call with the library name. E.g.,.
Res = projMathStuff.TheFunction(1,2,3)
--
Cordially,
Chip Pearson
Microsoft Most Valuable Professional
Excel Product Group
Pearson Software Consulting, LLC
www.cpearson.com
(email on web site)