RichO
Registered Yoozer
- Local time
- Today, 17:28
- Joined
- Jan 14, 2004
- Messages
- 1,036
This has got me scratching my head. I have a calculation going on in a module that results in an overflow error. The calculation ends up multiplying a varable (value of 12) by 10000, resulting in 120000.
If I go:
Dim X As Long
X = 120000
No problem. But...
Dim X as Long
X = 12 * 10000
gives me an overflow error.
Msgbox 12 * 10000
also gives me the same error.
Me.Text2 = Me.Text0.Value * 10000
With a value of 12 in Text0 works just fine.
I've tried using Double as the variable type but still the same error.
Any ideas why this is happening?
Thanks
If I go:
Dim X As Long
X = 120000
No problem. But...
Dim X as Long
X = 12 * 10000
gives me an overflow error.
Msgbox 12 * 10000
also gives me the same error.
Me.Text2 = Me.Text0.Value * 10000
With a value of 12 in Text0 works just fine.
I've tried using Double as the variable type but still the same error.
Any ideas why this is happening?

Thanks
Last edited: