P.T.A.M. Administrator

Joined: 08 Oct 2003 Posts: 752 Location: Greece
|
Posted: Dec 18th, 2003 12:08 PM Post subject: Evaluate a string expression like a math function |
|
|
Just add a textbox (txtEval) and a command button (cmdEval) and here you go :
| Code: | Private Sub cmdEval_Click()
Dim objSC As New MSScriptControl.ScriptControl
objSC.Language = "javascript"
MsgBox objSC.Eval(txtEval.Text)
End Sub
|
If you want to input a function and have a variable in there you can just input it and then use the replace function to end up with an answer  _________________ No one is completely useless. They can at least be an example of what to avoid. |
|