Hi John,
It works fine for me with ExcelDna 0.20 and Excel 2007.
I have the following .dna file:
<DnaLibrary Language="C#">
using System;
using ExcelDna.Integration;
public class TestFunctions
{
static Random rnd = new Random();
[ExcelFunction(Description = "Random value greater than or equal
to 0 and less than 1.", IsVolatile = true)]
public static double NewRandom()
{
return rnd.NextDouble();
}
}
</DnaLibrary>
and the VBA function looks like this:
Function VbaNewRandom()
VbaNewRandom = Application.Run("NewRandom")
End Function
I can put =NewRandom() or =VbaNewRandom() in a sheet, and I get the
expected results.
Let us know if you find something interesting.
Regards,
Govert