How to: Run Excel Calculations Programmatically
The information in this topic applies only to the specified Visual Studio Tools for Office projects and versions of Microsoft Office.
Microsoft Office version
For more information, see Features Available by Application and Project Type.
You use a similar process to run calculations in a NamedRange control or a native Excel range object.
The following example creates a NamedRange at cell A1 and then calculates the cell. This code must be placed in a sheet class, not in the ThisWorkbook class.