Trapping Calculate and CalculateFull calls

Oct 19, 2011 at 2:42 PM

Hello

Does anyone know of a way to trap F9 (refresh) events in an ExcelDNA addin?  I want to be able do call my refresh code in my Add In when the user presses F9.

Kind Regards
Jon

Oct 19, 2011 at 3:38 PM
Edited Oct 19, 2011 at 3:38 PM

Would this work:

public void AutoOpen()
{
    XlCall.Excel(XlCall.xlcOnKey, "{F9}", "Excel_OnF9Key");
}
public static void Excel_OnF9Key()
{
     // your code here
}