March 9th, 2014, 1:17 pm
hi, I created a dll and want to use it from excel using vba.one of the arguments to the c++ function is option type 'P','C' of type charmy c++ function returns a vector containing the option value,standard deviation,and standard error.c++ function:vector <double> _stdcall MonteCarloSobol(double p, double k, double vol, double rate, double div, double T, char type1, long N, long M)Vba definition:Declare Function MonteCarloSobol Lib _"C:\C++Development\Monte Carlo DLL\Debug\MonteCarlo_dll.dll" _(ByVal p As Double, ByVal k As Double, ByVal vol As Double, ByVal rate As Double, _ByVal div As Double, ByVal T As Double,byval type1 as string , ByVal N As Long, ByVal M As Long) As Doublenot sure the string in the vba works ,any ideas ? also how to get a vector output in VBa as well ?