Hello Govert,
I have taken a look at this
page and have tried following it to create an asynchronous function.
However when I try to run the function, the cell shows #N/A.
Please have a look at my code:
This is part of my Functions.cs file:
public static string SMPLoop(double time)
{
double value = 1;
string returnString = "DONE!";
for(int i = 0; i < time * 1000000000; i++)
{
value++;
}
return returnString;
}
public static object SMPLoopAsync(double time)
{
return ExcelAsyncUtil.Run("SMPLoopAsync", time, delegate{ return SMPLoop(1); });
}
Also I have a ThisAddIn.cs file which contains the ThisAddIn class which implements the IExcelAddIn interface.
In the AutoOpen event handler. I have added the line ExcelAsyncUtil.Initialize(); and it tells me that it is obsolete.
Best Regards,
Steven