Same function in add-in and workbook module

H

hermac

I have an add-in with several UDFs. If I copy one or more of these
functions to a workbook module , I seem to get no trouble calling such
function in that workbook. It also seems that the function which is
actually used then is the one in the workbook, not the one in the add-
in.
The reason for doing so is that I want to distribute the workbook to
other people with only the copied UDFs and without the whole add-in.
I want to keep that workbook on my own computer as well , thus having
the same UDF twice.
Is this sound practice or should I expect trouble?
Thanks for your advice.
Herman
 
P

Peter T

I would suggest you rename the functions that you copy from your addin to
the workbook. It should not be too difficult for you to search & replace-all
in formulas to switch between use of workbook/addin functions.

If for some reason you prefer not use same names, after copying the
functions into the workbook, close the original addin (also rename or move
the file to a different folder). Recalc the workbook, save, close it. Reopen
it (with the addin still closed). First good indication is if you do not get
a missing link message, then check that all the formulas that call the UDF's
point correctly with no #NAME? errors.

If all looks OK it should be safe to distribute the workbook.

Regards,
Peter T
 

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