View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
Marvin Marvin is offline
external usenet poster
 
Posts: 71
Default Call an ADDIN function from VBA code

Unfortunately, the syntax you suggest doesn't work. My code is:

rtl=application.run "Marvin's Private Functions.xla!topleft",r

It produces a compiler error indicating

Expected: end of statement

"papou" wrote:

Hi Marvin
Yes you can return the value with :
MyValue = Application.run "YourAddin.xla",Argument

HTH
Cordially
Pascal

"Marvin" a écrit dans le message de news:
...
This syntax allows execution, but does not allow for a return value from
the
function in ther ADDIN.

"papou" wrote:

Hi Marvin
Use Application.run "YourAddin.xla",Argument

HTH
Cordially
Pascal

"Marvin" a écrit dans le message de
news:
...
I have a function in an addin that is loaded. I seem unable to come up
with
the syntax in VBA code to get it to function properly.

As a workbook function it is used as
=topleft(r)
where r is a range

If I copy the code into the module, it is used as

rtl=topleft(r)

How do I use it without cloning the code into the module?

Thanks.