Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I have written a custom function. It works perfectly well when the cod
is in a module sheet in the same workbook that the function is use in. However, when I create an AddIn file for this custom function by savin it as an AddIn i.e with an .xla extension, e.g MyFunc.xla and then us the function in another workbook, it always comes up with an error Before using this function in the other workbook, I have made sure tha with the workbook that I want to use the function in as the activ workbook, a reference to the addin (MyFunc.xla) has been made b checking the check box for this addin by going into Tools-Addin etc.. What am I doing wrong? Can anyone help? Best regards Deepak Agarwa -- Message posted from http://www.ExcelForum.com |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
On Thu, 15 Jul 2004 19:32:36 -0500, agarwaldvk
wrote: I have written a custom function. It works perfectly well when the code is in a module sheet in the same workbook that the function is used in. However, when I create an AddIn file for this custom function by saving it as an AddIn i.e with an .xla extension, e.g MyFunc.xla and then use the function in another workbook, it always comes up with an error. Before using this function in the other workbook, I have made sure that with the workbook that I want to use the function in as the active workbook, a reference to the addin (MyFunc.xla) has been made by checking the check box for this addin by going into Tools-Addin etc.. What am I doing wrong? Can anyone help? What is the error? Could there be a naming conflict? --ron |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() "agarwaldvk " wrote in message ... I have written a custom function. It works perfectly well when the code is in a module sheet in the same workbook that the function is used in. However, when I create an AddIn file for this custom function by saving it as an AddIn i.e with an .xla extension, e.g MyFunc.xla and then use the function in another workbook, it always comes up with an error. Before using this function in the other workbook, I have made sure that with the workbook that I want to use the function in as the active workbook, a reference to the addin (MyFunc.xla) has been made by checking the check box for this addin by going into Tools-Addin etc.. What am I doing wrong? Can anyone help? My test results on your situation: TEST_xla.xla contains a module with this function Public Function CubeMe(num as Integer) as Long CubeMe = num * num * num end function After activating the AddIn file, the function worked in several workbooks that I opened and tested it in, e.g. in cell A1 of some workbook type in =CubeMe(3) OR =CubeMe(C4) etc. Perhaps your function in the *.xla isn't declared as Public? Might be a scope issue. HTH. -gk- |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
custom addin gives #name? errors | Excel Worksheet Functions | |||
An AddIn for a custom function | Excel Discussion (Misc queries) | |||
How I know if a file is using a custom addin | Excel Discussion (Misc queries) | |||
How I know if a file is using a custom addin | Excel Worksheet Functions | |||
Custom Functions saved as addin | Excel Worksheet Functions |