Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

Overflow Run-time error

Posted on 2003-12-11
1
359 Views
Last Modified: 2010-05-01
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
Comment
Question by:marekcz
1 Comment
 
LVL 7

Accepted Solution

by:
Smallint earned 125 total points
ID: 9919580

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

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Most everyone who has done any programming in VB6 knows that you can do something in code like Debug.Print MyVar and that when the program runs from the IDE, the value of MyVar will be displayed in the Immediate Window. Less well known is Debug.Asse…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…

765 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question