Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Excel UDF Description, Help Keyword, Help File

I've the following Excel UDF function (C#) which works if invoked from Excel.

Would like to display function description and association help. Tried
different attributes but wasn't succesful.


/// <summary
/// Calculate Income Tax.
/// </summary
/// <param name="income"income for which tax is to be
ascertained</param
/// <returnstaxable amount</returns
/// public double Tax(double income, [Optional] string
incomeFromOtherSources)
[System.EnterpriseServices.Description("Calculate Income Tax"),
HelpKeyword("Help Keyword Attribute")]
public double Tax(double income)
{
if (income 0 && income <= 7000) { return (.10 * income); }
if (income 7000 && income <= 28400) { return 700.00 + (.15 *
(income - 7000)); }
if (income 28400 && income <= 68800) { return 3910.00 + (.25 *
(income - 28400)); }
if (income 68800 && income <= 143500) { return 14010.00 + (.28
* (income - 68800)); }
if (income 143500 && income <= 311950) { return 34926.00 +
(.33 * (income - 143500)); }
if (income 311950) { return 90514.50 + (.35 * (income -
311950)); }
return 0;
}

thanks guys for all your help,
Rama
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 132
Default Excel UDF Description, Help Keyword, Help File

Thinkrama, this may not incorporate everything you need, but it will
hopefully give you some ideas.

Jan Karel Pieterse's site, Registering a User Defined Function with Excel:
http://www.jkp-ads.com/Articles/RegisterUDF00.htm


"thinkrama" wrote:

I've the following Excel UDF function (C#) which works if invoked from Excel.

Would like to display function description and association help. Tried
different attributes but wasn't succesful.


/// <summary
/// Calculate Income Tax.
/// </summary
/// <param name="income"income for which tax is to be
ascertained</param
/// <returnstaxable amount</returns
/// public double Tax(double income, [Optional] string
incomeFromOtherSources)
[System.EnterpriseServices.Description("Calculate Income Tax"),
HelpKeyword("Help Keyword Attribute")]
public double Tax(double income)
{
if (income 0 && income <= 7000) { return (.10 * income); }
if (income 7000 && income <= 28400) { return 700.00 + (.15 *
(income - 7000)); }
if (income 28400 && income <= 68800) { return 3910.00 + (.25 *
(income - 28400)); }
if (income 68800 && income <= 143500) { return 14010.00 + (.28
* (income - 68800)); }
if (income 143500 && income <= 311950) { return 34926.00 +
(.33 * (income - 143500)); }
if (income 311950) { return 90514.50 + (.35 * (income -
311950)); }
return 0;
}

thanks guys for all your help,
Rama

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 415
Default Excel UDF Description, Help Keyword, Help File

I seems to remember something by "keepItCool" involving UDF and using
Excel's hidden NameSpace.
Not sure how applicable from a C# point of view
http://www.jkp-ads.com/articles/RegisterUDF01.htm

NickHK

"thinkrama" ...
I've the following Excel UDF function (C#) which works if invoked from
Excel.

Would like to display function description and association help. Tried
different attributes but wasn't succesful.


/// <summary
/// Calculate Income Tax.
/// </summary
/// <param name="income"income for which tax is to be
ascertained</param
/// <returnstaxable amount</returns
/// public double Tax(double income, [Optional] string
incomeFromOtherSources)
[System.EnterpriseServices.Description("Calculate Income Tax"),
HelpKeyword("Help Keyword Attribute")]
public double Tax(double income)
{
if (income 0 && income <= 7000) { return (.10 * income); }
if (income 7000 && income <= 28400) { return 700.00 + (.15 *
(income - 7000)); }
if (income 28400 && income <= 68800) { return 3910.00 + (.25
*
(income - 28400)); }
if (income 68800 && income <= 143500) { return 14010.00 +
(.28
* (income - 68800)); }
if (income 143500 && income <= 311950) { return 34926.00 +
(.33 * (income - 143500)); }
if (income 311950) { return 90514.50 + (.35 * (income -
311950)); }
return 0;
}

thanks guys for all your help,
Rama



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
File Property Keyword Search SCSC Excel Discussion (Misc queries) 0 December 12th 07 05:41 PM
Limitation to length of Add-In description causes add-in manager to report the add-in file missing. [email protected] Excel Discussion (Misc queries) 1 February 27th 07 04:04 AM
Excel 2000 Help File - What keyword Martin Folley Excel Discussion (Misc queries) 3 June 30th 06 05:05 PM
Excel VBA - determine location of a keyword Sinobato[_2_] Excel Programming 2 July 22nd 04 06:01 AM
Excel Splitting Up Data By Keyword caz[_2_] Excel Programming 0 June 24th 04 06:34 PM


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