I have an access table which stores formulas and a query which passes the formula into VB as a string. I would like this formula to calculate as code in VB. the formula calculation is x/y so i would like it to calculate x/y. I have tried eval but could not get it to work.



public function calc (x as double, y as double, formula as string) as double
calc= eval (formula)

end function