Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default UDF for Excel in C# paramters not coming through

Hello,

I'm trying to get a UDF written in C# to work.

Thanks to the excellent article from Eric Carter you'll get a flying
start.
"user defined functions for Excel in .NET"
http://blogs.msdn.com/eric_carter/ar...01/273127.aspx

But when I use the function in Excel as described I get the known
#VALUE! result ;o(
When I debug I see that the parameters from Excel are not coming
through, they remain null.
When I add a function without parameters, I get result.

It gets more strange because the breakpoints do not work "anymore" on
function MultiplyNTimes, the worked at least once ;o)
On every other function I add I can create breakpoints but still no
parameters coming through ;o)

f.i.:
public double Add(object Number1, object Number2)
{
double result = 0;
Excel.Range r1 = Number1 as Excel.Range;
Excel.Range r2 = Number2 as Excel.Range;

result = Convert.ToDouble(r1.Value2) +
Convert.ToDouble(r1.Value2);

return result;
}


I'm just starting to play with c#, any clues highly appreciated!

Thx!

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
Paramters or Arugment Auto-Label for User-Defined Function [email protected] Excel Worksheet Functions 5 April 22nd 08 06:21 PM
Database query with a range of cells as paramters? heprox Excel Discussion (Misc queries) 0 January 18th 07 11:15 PM
Excel Spreadsheet should be 5 pgs., coming out 10 pgs. Laura Excel Discussion (Misc queries) 2 March 8th 06 06:57 PM
how do I add paramters / criteria in the excel query? Mary Excel Programming 2 October 14th 05 05:19 AM
Parsing paramters Mark[_36_] Excel Programming 3 February 9th 04 05:03 PM


All times are GMT +1. The time now is 03:46 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"