But when i do something like 6-3 it comes up as 6 (the first number i entered)
It does the same with the divide and the multiply
heres the code for the Subtract
Private Sub Button12_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button12.Click 'Make sure out input box has a value If TextBox1.Text.Length <> 0 Then 'Check the value of our function flag If calcFunc = String.Empty Then 'Flag is empty 'Assign the value in our input 'box to our holder valHolder1 = CType(TextBox1.Text, Double) 'Empty the input box TextBox1.Text = String.Empty Else 'Flag isnt empty 'Call our calculate totals method calculatetotals() End If 'Assign a value to our calc function flag calcFunc = "subtract" 'Toggle the decimal flag hasDecimal = False End If End Sub
I use the same code for add but i change calcfunc = "subtract" to
calcfunc = "add"
calcfunc = "Multiply"
calcfunc = "Divide"
Etc
Can someone please help i've spent hours getting to where i am
thanks

New Topic/Question
Reply





MultiQuote




|