JFulford84
Board Regular
- Joined
- Jun 14, 2010
- Messages
- 158
Can anyone help explain why I'm getting this?
When I do a MsgBox(a/b) the calculation is correct at .5 or 50%. However when I calculate that number then assigned it to variable like resultOf = a/b, it shows resultOf as being 1.
Anyone able to offer any insight?
a = 10,000
b = 20,000
MsgBox(a/b) = .5
Dim resultOf as Long
resultOf = a/b
MsgBox(resultOf) = 1
When I do a MsgBox(a/b) the calculation is correct at .5 or 50%. However when I calculate that number then assigned it to variable like resultOf = a/b, it shows resultOf as being 1.
Anyone able to offer any insight?
a = 10,000
b = 20,000
MsgBox(a/b) = .5
Dim resultOf as Long
resultOf = a/b
MsgBox(resultOf) = 1