ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Best practise XLA add-in (https://www.excelbanter.com/excel-programming/375068-best-practise-xla-add.html)

L-E Eriksson

Best practise XLA add-in
 
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







Bob Phillips

Best practise XLA add-in
 
Addins should be properly loaded, via ToolsAddins 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)

"L-E Eriksson" wrote in message
...
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









Dave Peterson

Best practise XLA add-in
 
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????



Bob Phillips wrote:

Addins should be properly loaded, via ToolsAddins 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)

"L-E Eriksson" wrote in message
...
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







--

Dave Peterson

Dave Peterson

Best practise XLA add-in
 
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.

L-E Eriksson wrote:

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


--

Dave Peterson


All times are GMT +1. The time now is 10:31 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com