Im using this simple code:
In the two MsgBox that pop up I first get 45 and then after the calculation I get 3.75. This is correct.
But when I put this into the program Im actually using I get 45 and then 4. Not 3.75. This makes no sense. I have copied and pasted the code from one to the other and then back. It works just fine on the test program but it keeps giving the wrong numbers in the actual program.
I know the starting number is correct, I have it hard coded to be 45. Then the very next line it does the division and then the very next line I get the wrong answer. But it works correctly in the test program. Why is this?
Division giving the wrong answer.
Code:
Inch = 45
MsgBox "" & Inch & " Before"
Inch = Inch / 12
MsgBox "" & Inch & " After"
But when I put this into the program Im actually using I get 45 and then 4. Not 3.75. This makes no sense. I have copied and pasted the code from one to the other and then back. It works just fine on the test program but it keeps giving the wrong numbers in the actual program.
I know the starting number is correct, I have it hard coded to be 45. Then the very next line it does the division and then the very next line I get the wrong answer. But it works correctly in the test program. Why is this?