CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com

# Thread: Calculating with very large numbers

1. Member
Join Date
Feb 2003
Location
Holland
Posts
146

## Calculating with very large numbers

Hi,
I have to calculate the controlnumber in an IBAN bank account number.
First i have to change the a part of the account numer to a string with only 0 to 9

This is what is should be:

Dim Amount1 as ???
dim Amount2 as ???
dim amount3 as ???
dim Temp as string

I do have the string, say temp ="271011240123456789232100"

Then i have to do:
Amount1 = temp / 97 The result must be 2793930310551100919918,5567010309278351

Amount2 must be the decimals from amount1
Amount2 = 0,5567010309278351

Then amount3 = amount2 * 97 Result wil be 54

Then 98 - amount3 (54) = 44
(98 is a fix numer)

44 then is the controlnumber

How to do this in VB6

Herman

2. ## Re: Calculating with very large numbers

I don't think you can use VB6 with 271011240123456789232100 as it will overflow

3. Super Moderator Power Poster
Join Date
Jul 2008
Location
WV
Posts
5,264

## Re: Calculating with very large numbers

If you use a double it will not result in an overflow but I doubt that you will be able to get that level of precision on such a large number

#### Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts
•