UDF shows #NAME? when moved from XLA to XLL

M

mobigital

I had some functions written in an XLA, and used in the spreadsheet.
Later I re-wrote them in an XLL, and gave them the same names as in
XLA.

When I uncheck the old XLA addin and load the new XLL, Excel is not
able to find
the UDF in new add-in, and shows a #NAME?

However, in any new workbook, the new function works ok. Only the old
workbook
somehow still expects to resolve these functions through XLA.

if anyone have any ideas, I'd greatly appreciate it.

thanks
 
B

Barb Reinhardt

I've recently tried setting a reference to an XLA within the VBE. It was
pretty slick. I wonder if that will work.
 
D

Dave Peterson

I don't use the xll stuff, but I have had the same problem when I create a UDF
in one workbook, then move that UDF to an addin. (I've learned to develop the
UDF in a workbook that doesn't matter!)

(And you have removed that UDF from the addin, right????)

This might be easier if you convert your Addin to a normal workbook.

Inside the VBE
ctrl-r to see the project explorer
select ThisWorkbook
Hit F4 to see the properties
change the IsAddin property to False

Then back to excel where you should be able to activate a worksheet in your
addin/workbook.

Say your UDF's name is =myFunc().
Create a new name in your addin -- call it myFunc
Then delete that name.

Then select all the cells
Edit|replace
what: =
with: =
replace all

After forcing the recalc, excel should see the UDFs in the XLL (I hope!).

Then change your workbook back to an addin and save it.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top