This should be simple but I can't figure out how to do it. I have a form with a text box in which the user will type a function like x^2*cos(x). I want to be able to take the value the user typed into the box and have vb understand it as a mathematical expression rather than as a string. I have all the code I need working but right now I have to edit the code every time I want to change the function.

Thanks for your help - Eric