ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Calling VB functions that are stored in an addin (https://www.excelbanter.com/excel-programming/421087-calling-vbulletin-functions-stored-addin.html)

Eivind

Calling VB functions that are stored in an addin
 
I have a VB function, say test, that is stored in an addin. In my Excel
workbook I refer to the function by writing =test(...) in the appropriate
cell. When I transfer the workbook and the addin to a colleague, I experience
that the funtion call has been preset with the full file address to the addin
file, i.e. ='C:\Documents and Settings\cu72\Application
Data\Microsoft\AddIns\addin_containing_test.xla'!t est(...).
And since my colleague doesn't have access to my C: drive the program
doesn't work. A workaround is of course to manually remove the full string
everywhere, but that's rather cumbersome and not very elegant. There must be
a better way?
Any suggestion will be appreciated :)

royUK[_89_]

Calling VB functions that are stored in an addin
 

Can you post the actual code?


--
royUK

Hope that helps, RoyUK
For tips & examples visit my 'web site' (http://www.excel-it.com/)
------------------------------------------------------------------------
royUK's Profile: http://www.thecodecage.com/forumz/member.php?userid=15
View this thread: http://www.thecodecage.com/forumz/sh...ad.php?t=39135


Peter T

Calling VB functions that are stored in an addin
 
Edit, Links, your addin, Break Links

forget if that works in Excel 2000, if not post back

Regards,
Peter T

"Eivind" wrote in message
...
I have a VB function, say test, that is stored in an addin. In my Excel
workbook I refer to the function by writing =test(...) in the appropriate
cell. When I transfer the workbook and the addin to a colleague, I
experience
that the funtion call has been preset with the full file address to the
addin
file, i.e. ='C:\Documents and Settings\cu72\Application
Data\Microsoft\AddIns\addin_containing_test.xla'!t est(...).
And since my colleague doesn't have access to my C: drive the program
doesn't work. A workaround is of course to manually remove the full string
everywhere, but that's rather cumbersome and not very elegant. There must
be
a better way?
Any suggestion will be appreciated :)




Ron Rosenfeld

Calling VB functions that are stored in an addin
 
On Wed, 10 Dec 2008 02:04:01 -0800, Eivind
wrote:

I have a VB function, say test, that is stored in an addin. In my Excel
workbook I refer to the function by writing =test(...) in the appropriate
cell. When I transfer the workbook and the addin to a colleague, I experience
that the funtion call has been preset with the full file address to the addin
file, i.e. ='C:\Documents and Settings\cu72\Application
Data\Microsoft\AddIns\addin_containing_test.xla'! test(...).
And since my colleague doesn't have access to my C: drive the program
doesn't work. A workaround is of course to manually remove the full string
everywhere, but that's rather cumbersome and not very elegant. There must be
a better way?
Any suggestion will be appreciated :)


I've seen that behavior when the name of the UDF is not unique. So if, for
example, the name of your add-in is test.xla; and the name of your function is
test.xla; or if your colleague has a similarly named function or module on his
machine, there will be an issue.

It may also occur if your colleague does not have your add-in installed on his
machine.
--ron


All times are GMT +1. The time now is 11:38 AM.

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