Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default what is wrong with this code? (when used in the excel_addin)


Where is that code from and how are you invoking it in Excel when it
works as a stand alone?NA_AB;162105 Wrote:
hey friends,

public int addme(params object[] list)
{
// sum all the integers included in list
int sum = 0;
foreach (object o in list)
if (o.GetType() == typeof(int))
sum += (int)o;
return sum;
}

this code works fine as a stand alone code but when am trying to invoke
the
"addme" function from excel by saying "=addme(10,20,30)" or
"=addme(10,20)"
in the excel cell, it is not returning me the sum. All I see is
"#VALUE!" in
that excel cell.

kindly let me know what should be done in this regard...



--
The Code Cage Team

Regards,
The Code Cage Team
'The Code Cage' (http://www.thecodecage.com)
------------------------------------------------------------------------
The Code Cage Team's Profile: http://www.thecodecage.com/forumz/member.php?userid=2
View this thread: http://www.thecodecage.com/forumz/sh...ad.php?t=45076

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 57
Default what is wrong with this code? (when used in the excel_addin)


this code when written in a simple console application and when this
function is called, it is getting executed perfectly with variable number of
arguments.

But, when am using the same code in "connect.cs" of the excel addin project,
and invoking this function from MS Excel(2003) as '=addme(10,20)' or
'=addme(10,20,30)' it is not giving any result, it is simply showing a
"#VALUE!"

thanks in advance... any help is considered very thankful..
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
What is wrong with this code? Steve[_73_] Excel Programming 3 September 26th 08 10:17 PM
What's wrong with this code? access user Excel Programming 9 March 17th 08 08:46 PM
What is wrong with the code? Eric Excel Discussion (Misc queries) 2 September 13th 07 10:36 AM
What the F@#% is wrong with this code?? Finny[_3_] Excel Programming 8 July 19th 06 04:56 PM
Can someone tell me what is wrong with this code? Ant Excel Discussion (Misc queries) 8 November 14th 05 02:53 PM


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