How to get string formula output

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Sabjay
    New Member
    • Jun 2014
    • 1

    How to get string formula output

    Hi All,

    I just wanna ask one simply question..
    Is there anyone know how to calculate the output value from a string like
    that??

    Code:
    Dim strFormula As String = "20+30+(100+20+30)*0.1"
    Dim douOutput As Double
    
    douOutput = Function(strFormula)
    what can i do to calculate the dynamic formula string and put it into the
    variable "douOutput" ??

    Thanks All,
    Last edited by Rabbit; Jun 12 '14, 08:39 PM. Reason: Please use [code] and [/code] tags when posting code or formatted data.
  • Luk3r
    Contributor
    • Jan 2014
    • 300

    #2
    Code:
            Dim strForumla As String = 20 + 30 + (100 + 20 + 30) * 0.1
            Dim douOutput As Double
    
            douOutput = strForumla

    Comment

    Working...