Hi!
First, add to project references Microsoft Scripting Runtime. Second,
Dim oScript As New ScriptControl
oScript.Language = "VBScript"
result = oScript.Eval("(1+5)/3")
MsgBox result
What's all!
>Is somebody can tell me if it's possible to get the numeric result of a mathematical expression and/or Visual basic function included in a string variable.
>ex.: sString1 = "1/2" result : 0.5
>or sString1 = "(1+5) /3" result : 2
>or sString1 = "Abs(-3.445)" result : 3.445