View Full Version : Simple VB question

10-08-2005, 12:20 PM
I want to make a calculator with 3 text entry boxes where the person enters the two numbers and the operator (+-*/).

How do I pass the operator to a variable so that VB sees it as an operator and not a string?

10-08-2005, 04:12 PM
Maybe this will help http://www.developerfusion.co.uk/show/198/

Alternatively you may try a case statement to look for the operator and multiply or subtract etc as the case may be which is probably easiest.

10-08-2005, 04:35 PM
Personally i would go for the case statement as parry mentioned, i have a feeling I did just that in a similar project when I did a VB intro course years ago