Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 366
  • Last Modified:

Overflow Run-time error

Hi,

I would like to get the rest of division very big number with 30 digits
for example 116022440020551020156789252100

- I don't want to represent this numer by any approximation in the form 1.16022440020551E+29
- I received Run-time error '6' Overflow

Code:

Dim rest As Long

rest = 1.16022440020551E+29 Mod 97

If I change

rest = 1.16022440020551E+29 - Int(1.16022440020551E+29 /97) *97

always the result is equal 0
0
marekcz
Asked:
marekcz
1 Solution
 
SmallintCommented:

You cannot handle such huge number directly in VB

If you do not want approximations biggest datatype is Currency

with values between – 922.337.203.685.477,5808 and 922.337.203.685.477,5807.


If you need more you must develop your own operators.


Cheers
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now