View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Thomas Mutzl Thomas Mutzl is offline
external usenet poster
 
Posts: 2
Default Excel 2003: custom function with dotnet

Is it possible (and HOW?) to write a user defined
(=custom) function in managed code??

In a Excel Cell, I want to use
=Test(12)

With VBA I would write a function in module like
Function Test (x as integer) as integer
Test = x*x
End Function

Now I want to implement this udf with Visual Studio Tools
for Office. Using C#, the function should look something
like
public static int Test(int x)
{
return x*x;
}

But I have no idea, how to make the Excel-Workbook able,
to use my function in the "managed code extension"...

Thanx for your advice!!

Thomas