User Defined Functions in an Add-in

ElvisSteel

Board Regular
Joined
Mar 23, 2009
Messages
122
I have setup an add-in containing several of my commonly used User Defined Functions. When I use one of these functions in a workbook with the add-in loaded, I just get #NAME? unless I specify the Add-in name explicitly prior to the function,
e.g. =Addin.xla!FunctionName(params...)

When I press enter, this works OK, but the in-cell formula shows...
=FunctionName(params...), the Addin bit has disappeared.
If I re-edit this cell, F2+Enter, the #NAME? error reappears.

Can anyone advise what I am doing wrong?
I am using Excel 2003 with Windows XP.

Thanks
 

Excel Facts

Move date out one month or year
Use =EDATE(A2,1) for one month later. Use EDATE(A2,12) for one year later.
Speculation: Does the name conflict with an Excel function/some other type of reserved name?
 
Upvote 0
Hi and thanks for your help on this, the functions were called "CalcRtn", "CalcFormula" and "CalcRating" - I am fairly sure that not all of these can be reserved names!
Anyway, I renamed the functions in the add-in (to CalcReturn, CalcScore and CalcRate) and then changed the formulae in the worksheet and it worked straight away. The only thing I can think is that the problem was caused because I originally cut the functions out of the worksheet macro, and pasted them into the add-in without changing the worksheet formulae. Maybe the worksheet couldn't resolve this.
All seems OK now, and I have since added a few more and each time created the function before entering the formula into the worksheet and all is OK.
Thanks again for taking the time to help
 
Upvote 0

Forum statistics

Threads
1,214,650
Messages
6,120,734
Members
448,987
Latest member
marion_davis

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top