Suppose I have a function written in C++, say
double GenerateRandomNumber(double seed)
I want to compile it as a DLL and attach it to an Excel spreadsheet, so I can use it like an ordinary VBA function. My questions:
1. How do I change the settings in Visual Studio so that the code gets compiled as a DLL?
2. How do I use the DLL in Excel?