趋势线方程评估variables值不在循环中更新

我正在编写一个程序,它将采用两条交叉的趋势线,并对它们进行评估,直到find可接受的十字路口。

我已经到了我有趋势线的地步,格式化了我的喜好,并且用variables(数组的一列)replace了x。 当我开始循环时,如果有100个input,其中最低的将是我的“点”,则在趋势线方程被评估之前,variables不更新为新的值或步长。

这里是我的代码的相关部分,其中tl1eq和tl2eq是我的趋势线方程string:

tl1eq = Replace(tl1eq, "y =", "") tl1eq = Replace(tl1eq, "x2", "x^2") tl1eq = Replace(tl1eq, "x", " * " & flhd(i, 1) & " ") tl2eq = Replace(tl2eq, "y =", "") tl2eq = Replace(tl2eq, "x6", "x^6") tl2eq = Replace(tl2eq, "x5", "x^5") tl2eq = Replace(tl2eq, "x4", "x^4") tl2eq = Replace(tl2eq, "x3", "x^3") tl2eq = Replace(tl2eq, "x2", "x^2") tl2eq = Replace(tl2eq, "x", " * " & flhd(i, 1) & " ") 'create an step amount between low and high flows, with 100 steps x = (hflow - lflow) / 100 'fill array with step values and summation of curve equations For i = 1 To 100 flhd(i, 1) = lflow + (x * i) flhd(i, 2) = Abs(Evaluate(tl1eq) - Evaluate(tl2eq)) MsgBox (flhd(i, 1) & " " & tl1eq & " " & Evaluate(tl1eq) & " " & tl2eq & " " & Evaluate(tl2eq)) Next i 

flhd(i,1)在评估时不会在string中更新,但在msgbox中显示为正确的值。

任何帮助,将不胜感激。