I have to display te resul of a simple math operation entered as string
example
input="22+2*3"
output display=28
Anybody knows how
Printable View
I have to display te resul of a simple math operation entered as string
example
input="22+2*3"
output display=28
Anybody knows how
http://www.vbforums.com/attachment.p...chmentid=47052
you could parse it manually, or
you could add a Microsoft Script Control to your form and then just do:VB Code:
MsgBox ScriptControl1.Eval("22+2*3")
the problem is it needs to be display as a object in the form
eh? the control just does he calculating, you can assign to result to whatever you like:VB Code:
Label1.Caption = ScriptControl1.Eval("22+2*3")
hi Check the zip I included it do what you want without depending on other control all code commeneted, supports all Math operators variables brackets, Functions and more.