Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Using UDF in COM Addin as formula in worksheet

I have written a COM addin in VB to store user defined data in
CustomDocumentProperties of a workbook. Now i want to insert these props in
a cell
like

Application.ActiveCell.FormulaR1C1 = "=GETPROPERTY(""" &
sPropertyName & """)"

It works if i define the GETPROPERTY function directly in a module of
workbook, but i want to define this function in the COM addin without
writting a wrapper XLA. (see MSDN KnowledgeBase article Q256624 - Howto: Use
a COM Add-In Function as an Excel Worksheet function)

Is this possible???

Thanks in advance.Ralf


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Using UDF in COM Addin as formula in worksheet

Can you make your function a DLL/xll rather than a COM Addin.
http://msdn.microsoft.com/library/en...icedev_topic16

I think you can call that directly, but the article starts out:

Microsoft Excel 2000 cannot call a function directly in a COM Add-in from a
worksheet cell formula. However, you can create a Visual Basic for
Applications (VBA) wrapper for the COM Add-in function so that the function
may be called indirectly.

If you are using xl2002, then you can use an Automation-Addin
Create a Visual Basic Automation Add-in for Excel 2002 Worksheet Functions
(Q285337)


--
Regards,
Tom Ogilvy

"Ralf Zimmermann" wrote in message
...
I have written a COM addin in VB to store user defined data in
CustomDocumentProperties of a workbook. Now i want to insert these props

in
a cell
like

Application.ActiveCell.FormulaR1C1 = "=GETPROPERTY(""" &
sPropertyName & """)"

It works if i define the GETPROPERTY function directly in a module of
workbook, but i want to define this function in the COM addin without
writting a wrapper XLA. (see MSDN KnowledgeBase article Q256624 - Howto:

Use
a COM Add-In Function as an Excel Worksheet function)

Is this possible???

Thanks in advance.Ralf




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
Urgent Pls, how to convert an addin xlam file to xls worksheet in Ahmed Excel Discussion (Misc queries) 1 April 28th 09 06:25 PM
Formula Evaluator Addin??? Mike Excel Discussion (Misc queries) 5 August 7th 07 04:24 PM
How do I edit a worksheet that has been defined as an addin Guy Normandeau Excel Discussion (Misc queries) 3 June 30th 06 07:00 PM
AddIn Robin Clay[_2_] Excel Programming 6 September 8th 03 11:08 AM
raw speed for excel worksheet functions? - xll -or com addin? John Doe[_3_] Excel Programming 1 August 18th 03 11:26 PM


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

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"