Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default How do I access XLA functions?

I have a function - Public Function GetDescription() - which worked fine when tested in the original Workbook. I then saved it as an XLA and loaded the add-in via the tools menu, but I can't find out how to run the function! Its not listed in the Tools/Macros or Insert/Function, and if I type =GetDescription() in a cell, the result is #NAME? - which is the same as if I type in rubbish like =xcvr()

Can someone give me some guidance? I just want to assign it to a shortcut key.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,253
Default How do I access XLA functions?

Make sure that:

the function is in a normal module (NOT an object module)
the module does NOT have option private module
the function does NOT have private prefix

then it works fine for me.

in VBE
in Project window select your addin.
in Object browser

Select your addin's project
The function should be visible under globals
(at the bottom you should see that it's a public function)

Tip:
While you're in the object browser:
Right click the function:
select properties and you can enter a description which is visible in
the Formula Dialog in Excel



keepITcool

< email : keepitcool chello nl (with @ and .)
< homepage: http://members.chello.nl/keepitcool


"?B?UGV0ZXIgV29vZA==?="
wrote:

I have a function - Public Function GetDescription() - which worked
fine when tested in the original Workbook. I then saved it as an XLA
and loaded the add-in via the tools menu, but I can't find out how to
run the function! Its not listed in the Tools/Macros or
Insert/Function, and if I type =GetDescription() in a cell, the result
is #NAME? - which is the same as if I type in rubbish like =xcvr().

Can someone give me some guidance? I just want to assign it to a
shortcut key.


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,824
Default How do I access XLA functions?

And one more thing to check...

What did you call the module that held the function?

If you called it GetDescription, try renaming it to ModGetDescription (something
different).

Peter Wood wrote:

I have a function - Public Function GetDescription() - which worked fine when tested in the original Workbook. I then saved it as an XLA and loaded the add-in via the tools menu, but I can't find out how to run the function! Its not listed in the Tools/Macros or Insert/Function, and if I type =GetDescription() in a cell, the result is #NAME? - which is the same as if I type in rubbish like =xcvr().

Can someone give me some guidance? I just want to assign it to a shortcut key.


--

Dave Peterson

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default How do I access XLA functions - Bug MSFT?

Thanks for both replies. Unfortunately neither highlighted anything I was doing wrong, but this appears to be a bug, and I found another report of it on this newsgroup (though it hasn't been confirmed as a bug by MSFT)

Basically it appears that if you develop the code in a workbook, then save as an XLA and remove the code from the workbook, there are problems accessing the functions and subs in the XLA from that workbook. You can see and call them fine from other workbooks. I had to

1) Unload the add-in and ensure all related code was out of the workbook, and save it
2) Then save it to a different filename and load the add-in again

The functions and subs were then available as expected

Regards
Pete

================================================== =========
----- keepitcool wrote: ----

Make sure that

the function is in a normal module (NOT an object module
the module does NOT have option private modul
the function does NOT have private prefi

then it works fine for me

in VB
in Project window select your addin
in Object browse

Select your addin's projec
The function should be visible under global
(at the bottom you should see that it's a public function

Tip:
While you're in the object browser
Right click the function
select properties and you can enter a description which is visible in
the Formula Dialog in Exce


keepITcoo

----- Dave Peterson wrote: ----

And one more thing to check..

What did you call the module that held the function

If you called it GetDescription, try renaming it to ModGetDescription (somethin
different)

Peter Wood wrote
I have a function - Public Function GetDescription() - which worked fine when tested in the original Workbook. I then saved it as an XLA and loaded the add-in via the tools menu, but I can't find out how to run the function! Its not listed in the Tools/Macros or Insert/Function, and if I type =GetDescription() in a cell, the result is #NAME? - which is the same as if I type in rubbish like =xcvr()
Can someone give me some guidance? I just want to assign it to a shortcut key


--

Dave Peterso


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
Access add in functions to VBA OCONUS Excel Worksheet Functions 7 March 29th 06 06:50 PM
Not able to access certain Excel functions LauraJ3 Excel Worksheet Functions 1 February 2nd 06 03:35 AM
Please make it easier to access the IS functions (e.g., isblank) . melyndac2005 Excel Worksheet Functions 9 August 28th 05 05:06 AM
How to call worksheet functions from Access ? Martin Plamondon Excel Worksheet Functions 0 November 18th 04 06:50 PM
Can't access .xla functions from .xls doc... faustino Dina Excel Programming 1 July 31st 03 04:51 PM


All times are GMT +1. The time now is 01:00 PM.

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

About Us

"It's about Microsoft Excel"