VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



Evaluate mathematical expressions in a few lines

by Jorge A Marquez Winndgasse (1 Submission)
Category: Math/Dates
Compatability: VB 6.0
Difficulty: Unknown Difficulty
Originally Published: Tue 11th September 2001
Date Added: Mon 8th February 2021
Rating: (1 Votes)

Evaluate mathematical expressions in a few lines

API Declarations


' References: Microsft Excel Object Library
' If you dot include this referece the module will not work.

Rate Evaluate mathematical expressions in a few lines



    'Returns 0 if error in expression
    'Exxpression: Mathematical valid expression, z.B :  "23+(34/23*34)^2

    On Error GoTo errorHandle
   
    res = evaluate(expression)
    EvalExpresion = res
    Exit Function
    
errorHandle:
    expression = ""
    EvalExpresion = 0
End Function


Download this snippet    Add to My Saved Code

Evaluate mathematical expressions in a few lines Comments

No comments have been posted about Evaluate mathematical expressions in a few lines. Why not be the first to post a comment about Evaluate mathematical expressions in a few lines.

Post your comment

Subject:
Message:
0/1000 characters