Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 19
Default VSTO: calling excel funcions?

How do I call funcions in my own add-in from C# using VSTO 2003?
Regards
Lars Schouw

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,173
Default calling excel funcions?

Lars

More in hope than expectation as I am only skimming VSTO at the present (and
even then in VB.Net not C#), but if you have a pointer to the Excel
application object through the Office Interop structure then you should be
able to use the WorksheetFunction property of the Application object

xlApp.WorksheetFunction.Min(Range)

Note: Some functions are not available through this route for a list check
help in VBA for the property

--
HTH
Nick Hodge
Microsoft MVP - Excel
Southampton, England
www.nickhodge.co.uk
HIS


"Lars Schouw" wrote in message
oups.com...
How do I call funcions in my own add-in from C# using VSTO 2003?
Regards
Lars Schouw



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 19
Default calling excel funcions?

Thanks Nick
How about by own VBA add-in functions like e.g.
=ChineseNewYear(1/5/2005) from my own add-in holidays.xla

Regards
Lars Schouw

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 19
Default calling excel funcions?

I just found it you can use Application.Run( .... )

Runs a macro or calls a function.

Lars

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,173
Default calling excel funcions?

Lars

Sorry didn't realise it was a UDF. You have the correct route to run any
code in Excel now...good luck

--
HTH
Nick Hodge
Microsoft MVP - Excel
Southampton, England
www.nickhodge.co.uk
HIS


"Lars Schouw" wrote in message
oups.com...
I just found it you can use Application.Run( .... )

Runs a macro or calls a function.

Lars





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
working with funcions in filtered lists steven Excel Discussion (Misc queries) 2 July 19th 06 07:00 PM
Impossible to set security policy for VSTO Excel? Michi Henning Excel Programming 3 August 30th 05 06:56 PM
Excel in VSTO Milo Excel Programming 0 June 17th 05 02:57 AM
Get VSTO code to run on every launch of Excel Dave Excel Programming 1 December 8th 04 08:56 PM
VSTO Excel Addin JK Excel Programming 0 April 14th 04 09:26 PM


All times are GMT +1. The time now is 04:49 AM.

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"