Excel UDF Description, Help Keyword, Help File

T

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>
/// <returns>taxable 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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top