Best practise XLA add-in

L

L-E Eriksson

Hello!

I have a excel add-in with a few User Defined Functions.
The add-in is used by ten different users.
I have placed the add-in in the XLStart folder on each client machine
(C:\Program Files\Microsoft Office\OFFICE11\XLSTART).
My UDF looks like this in the formula field:
=GetCustomerName(A4)

When saving a workbook from one computer onto a network drive and then
opening the same workbook on a different computer, I have problems. When
opening the workbook on the other computer, the UDF looks like this:
='C:\Program Files\Microsoft
Office\OFFICE11\XLSTART\MyXLA.xla'!GetCustomerName(A4)

So the path of the xla is saved in the formula field. That would be OK if
the UDF could resolve the formula. But I get an error:
#NAME
in every cell where I have the UDF.

If I remove the path of the .xla the function can be resolved, but the error
returns if the workbook is saved and then opened on another computer.

I think I am doing something fundamentally wrong here, please enlighten
me...


Regards

L-E Eriksson
 
B

Bob Phillips

Addins should be properly loaded, via Tools>Addins and then browse for the
file. Being in the XLStart directory means they automatically get loaded
into Excel, but not as an addin, so move them somewhere else.

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)
 
D

Dave Peterson

I don't understand what you mean by the "not as an addin" portion. If I save an
addin into my XLStart folder, it'll get opened as an addin when excel opens.

Maybe just a semantic difference on what constitutes an addin????
 
D

Dave Peterson

If I had a choice, I'd put the addin in a network folder and have the users
install that addin using the UNC path (not the mapped drive). Then all
workbooks that you pass between users will point at that same UNC path to get to
the addin.

If that's not possible, I'd tell the users to create a dedicated folder on the
C: (C:\ErikssonUtils ???) and tell them to put the addin file in that location.

Then use tools|addins to install from that location. And the formulas with the
UDF will point to a common location/file.
 

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