index > Visual Studio Tools for Office > Excel UDF Description

Excel UDF Description

I have the following sample code snippet which after registering using ComRegisterFunctionAttribute is correctly available in Excel as User Defined Function (UDF).

/// <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;
}

How can I display the function Description in Excel? Function Help document and Description are what I need. Please help me out.

Thanks,
Rama




Rama Katta [MCSD.Net]
thinkrama

Hi Rama

this forum is dedicated to discussions concerning the VSTO technology, and things related to it. VSTO does not include Excel user-defined functions. You need to ask your question in a group that targets such things, such as Excel.programming or possibly one of the Excel developer newsgroups. See the "Please Read First" posting at the top of this forum for links.

http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=174275&SiteID=1




-- Cindy Meister (Word MVP)
Cindy Meister
Cindy,

The sample code is from VSTO book, that's the reason I posted the question here.
Thanks for the correction I'll try posting the same in Excel.Programming.

Thanks,



Rama Katta [MCSD.Net]
thinkrama

Hi Rama

Aha. I understand, now, why you asked here :-)

Given that background, you might also try asking in the office.developer.addins newsgroup. And check out XLDennis's website. He recently wrote a series of articles on managed code add-ins. If he didn't cover this, perhaps he has a place where you can add comments or ask additional questions.

http://msdn.microsoft.com/newsgroups/default.aspx?dg=microsoft.public.office.developer.com.add_ins&lang=en&cr=US

Cindy Meister
Thank you Cindy for all the info. I'll try and let you know.



Rama Katta [MCSD.Net]
thinkrama
reply 5

You can use google to search for other answers

 

More Articles

• Problem Running VSTO on webserver - VSTOStorageWrapper.Interop.dl...
• Office automation
• How to get VSTO running with Visual Studio 2005?
• Outlook Crash after ThisApplication_Shutdown()
• A newbie question: how to control word directly?
• Excel 2007 VSTO Addin UDF
• Editing Restriction
• How should I deploy my managed COM add-in
• I created a addin for office and its not loading for word or exce...
• Rules
Bookmark and Share
Welcome to Bokebb   New Update  
 

New Articles

• VSTO Controls
• deleting CustomDocumentProperties
• PInvokeStackImbalance was detected
• Integration in an existing project
• CommandBarButton and User Control Relati
• Unable to add customization to a WordML
• Infopath Addin CustomTaskPane
• Prolbems using webservices in the addin
• Working on Offfice 12 Beta 1 with VSTO
• Reply as plain text
• Why does the ContextSwitchDeadlock happe
• excel vsto workbook appln
• Paste can invalidate schema
• Microsoft Outlook 2003 query - How to..
• VSTO 2005 and Outlook 2007?

Hot Articles

• Invalid Characters for Excel Sheet Names
• InfoPath - WebService - BizTalk
• OPENING A TEMPLATE IN WORD 97
• Do you have to have Office installed?
• Threading issues GUI updates in the Acti
• Get Excel worksheet by index
• nesting multiple sumif statements
• VSTO 2005 SE Outlook Form Regions, CTP a
• Highlighting code in an email
• Before I go out and buy VSTO...
• Error: "Excel/Word visual studio de
• VSTO for Excel
• Get Reference to the Excel Worksheet fro
• <the system cannot find the reference
• Open action-pane from any existing word

Recommend Articles

• Double-click on Windows Form control ope
• VSTO does not run on Standard version of
• CommandBar Button Images when disabled...
• Project server error
• from a word document i need to extract s
• ActionsPane and IDTExtensibility2
• How can I load VSTO project from Winform
• Can not pass Infopath field value as sql
• Problem with Refactor - Rename feature.
• Publishing Issue VSTO Word Project
• Help with deployment
• VSTO
• Conversion of VB app w/Excel hooks (from
• Serious Error with VSTO 2005
• Access 2003 Stand-Alone and Win 2003 Ser