当前范围VBA代码中的重复错误

时间:2015-10-14 08:29:19

标签: excel vba excel-vba

Function Heston(Actualvol, m, theta, col, nSim) As Double  
    Dim Actualvol As Double,FinalVol As DOuble, VT As Double, i As Integer, theta As Double, col As Double, m As Double, nSim As Long  
    dt = 1 / 252  
    For i = 1 To nSim  
       VT = Actualvol + m * (theta - Actualvol) * dt + col * Sqr(Actualvol) * Application.NormInv(Rnd(), 0, 1) * Sqr(dt)  
       Sum = Sum + VT
   Next  
   FinalVol = Sqr(VT)  
   Heston = FinalVol  
End Function

请检查编译器说的原因"在当前范围之外复制错误" ?

0 个答案:

没有答案