Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to determine a text box entr as function???

Status
Not open for further replies.

aliinal

Technical User
Jun 26, 2001
104
TR
Is it possible to use a text box entry as function???

Example...
If the text1.text is 3x^2+4x+3 can i use it as a function?
 
Yes,
In Project, Add a Reference to Microsoft Script Control 1.0
No need to put script control on a form.
Code:
    Dim objScript As New MSScriptControl.ScriptControl
    objScript.language = "Vbscript"
    On error resume next
        MsgBox objScript.Eval("(2*18)^(.5)")
        if Err.Number <> 0 then
            MsgBox err.description
        end if
    On error goto 0
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top