Help! How to evaluate a math string expression into a number

  • Thread starter Thread starter JM
  • Start date Start date
J

JM

Hi,

I have an string with a math function as:

str = "exp(5)+sqr(4)"

How to convert that string into its numeric value???

I have tried:
dbl = val (str)
and
dbl = CDbl(str)
but does not works.

HELP!!
Thanks,

Jaime
 
JM said:
I have an string with a math function as:

str = "exp(5)+sqr(4)"

How to convert that string into its numeric value???

I have tried:
dbl = val (str)
and
dbl = CDbl(str)
but does not works.

Try dbl = Eval(str)
 
Back
Top