LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7
Default How Do I Use an XLL Add-In Function from Code?

I've done some research, and I can answer my own question. For anyone
who stumbles across this post, hoping for an answer, here it is:

1. I was using the wrong syntax. To use an XLL function, first register
the XLL with Application.RegisterXLL(), then run the function with
Application.Run().


-TC


TC wrote:
My question, short form:

I have an Excel Add-In, packaged as an XLL, which contains a worksheet
function -- let's call it F(). Can I use F() from VB/VBA? If so, how?


My question, long form:

I'm writing VB code for a client. My code needs to use a proprietary
modeling function developed by the client. I expected the client to
deliver their function to me in the form of a DLL. Instead, they sent
me an XLL. If I load the XLL into Excel as an add-in, I can call the
function from a worksheet. I cannot, however, call it from code. I've
tried adding a reference to the XLL file, but I cannot. The XLL, by the
way, requires a license for registration.

I believe one of the following is true, but I'm not sure which. Can
anyone offer suggestions?

1. I'm using the wrong syntax or the wrong approach. If I reference it
correctly, I should be able to access the XLL function from VB/VBA.

2. XLL functions can be referenced from code, but only if the
programmer configures them to be. In order to use the function, I need
to ask the client to modify his XLL, exposing the function to my code.

3. XLL functions cannot be referenced from code. I must ask the client
to repackage the function as a DLL.


-TC


 
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
Function or Code Needed Jennifer Excel Worksheet Functions 6 December 10th 08 02:59 PM
function or code? hal Excel Worksheet Functions 3 September 25th 08 08:14 PM
FUNCTION OR CODE ? tomjoe Excel Worksheet Functions 5 February 18th 08 05:39 PM
Function or Code Allan Excel Worksheet Functions 2 March 16th 05 06:55 PM
Sum Code/Function No Name Excel Programming 0 May 10th 04 09:37 PM


All times are GMT +1. The time now is 06:44 PM.

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"