hello,
I'm writing a VBA program and receive "run-time error 13: type mismatch"
this is the code in bold where it happens:
Let FactornEMA(nEMA) = 2 / (FactorMA(nEMA) + 1) 'run-time error 13: type mismatch
Let Cells(1 + nData, colEMA(nEMA)) = FactornEMA(nEMA) * (Cells(1 + nData, 4) - Cells(nData, 4))
Else
End If
For clarification, FactorMA(nEMA) is an array of about 2 possible values a and b.
I have all parts of the line defined as variables and I use that calculation as a constant in the next line.
Can somebody tell me why I receive this error?
Thanks.
Bookmarks