BACKGROUND : Teaching brother vb, starting with 3 txtboxes on a form simple calculator example (4 buttons add, minus, divide, multiply). type number into txt1 & txt2, hit one of the 4 buttons, hey presto, total in box3.

PROBLEM :
OK, I use
Code:
txt3.text = txt1.text * txt2.text
which works fine with * & /. With the + & - however I get the following:

  • ON the -, no entries appear
  • On the +, 2 numbers join, not add (I.e.- 1+1=11, 2+2=22)


Now even I know 2+2 is not 22, this just doesn't add up (pun intended there, sorry, had to put it in). Can anyone shed some light on this please?

Thank you!