vba - Calculating value of formula -
is there way read formula vba structure "y=3x^2-5*x+3" , have "y=" replaced blank ("") , x replaced actual value?
you can use evaluate caculate string formula
if had 3*x^2-5*x+3 (rather 3x^2-5*x+3) code retruns 53
dim strin string strin = "3*x^2-5*x+3" msgbox evaluate(replace(strin, "x", "5"))
Comments
Post a Comment