Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Custom function does not work from an addin

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,651
Default Custom function does not work from an addin

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default Custom function does not work from an addin


"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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
custom addin gives #name? errors bh1 Excel Worksheet Functions 4 February 5th 08 06:46 PM
An AddIn for a custom function FARAZ QURESHI Excel Discussion (Misc queries) 3 October 16th 07 02:35 PM
How I know if a file is using a custom addin Rodrigo Ferreira Excel Discussion (Misc queries) 3 September 15th 06 02:44 PM
How I know if a file is using a custom addin Rodrigo Ferreira Excel Worksheet Functions 1 September 15th 06 02:08 AM
Custom Functions saved as addin dbutcher Excel Worksheet Functions 2 April 7th 06 05:24 PM


All times are GMT +1. The time now is 08:40 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"