View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
Peter Wood Peter Wood is offline
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