View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Tomasz Jastrzebski Tomasz Jastrzebski is offline
external usenet poster
 
Posts: 4
Default How to return special values from function? (Excel 2007 + VS 2008)

Hello developers,

I have a class like this one below, registered as COM server and added to
Add Ins.

[Guid("some guid here")]
[ClassInterface(ClassInterfaceType.AutoDual)]
[ComVisible(true)]
public class Functions {
public object MyFunction() {
return ...
}
}

How do I return special values like #NAME!, #VALUE!, etc from my function?

Another question: how do I force Excel workbook to recalculate (F9) from my
VSTO Add In?

Thank you for any hints.

Tomasz