Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Run time Error -6: Overflow

Status
Not open for further replies.

winecellar

Technical User
May 13, 2005
3
0
0
US
Hi. i have no knowledge of Visual Basic except the problem..
This is a custom bidding application, originally running as a shared data base on a server for multiple users and running on Windows 98.
I am now attempting to load onto new stand alone PC running on Windows 2000
and get: Runtime error '6': Overflow immediately after entering my user name and password.
Original programmer has dissappeared and I need to access the calculator.
I have VB6, the source code CD, and a large number of files of various kinds. I understand that I might have to reassemble for the new configuration (or something), but I have no idea what to do.

Help!
 
If possible...

Run the source code in the Visual Basic IDE...

When it reaches the error, you can post that line of code here, and perhaps a few lines above it...

This will help us, help you...

Otherwise, you are asking a question with an infinite number of answers...

Generally, you get an over flow if you try to assign a number to a variabe that exceeds it's limits...

Such as assigning a Long Integer to an Integer, Double to a Single, Long to a Single, etc...

A memory Overflow, on the other hand, can be raised by an endless loop, circle references, or recursive functions, among other things...

Look for the project file (*.prj) and open it in VB
Press the run (play) button, Run>Start in the menu...

When it reaches the error, the program should pause, and place you in debug mode.
Here it should highlight the problem in yellow, with a yellow arrow to the left side...

You can copy that line a post it back here, and that will give a bit of a starting point to help trouble shooting...

Hope this helps ;-)

Visit My Site
PROGRAMMER: (n) Red-eyed, mumbling mammal capable of conversing with inanimate objects.
 
It might be date fields (differently handled on different platforms)...
He mentioned that the only difference is the platform. I would suspect the date fields. But CubeE101 is right: some debugging will not harm.
 
Friday, May 27, 2005 3:07 Pm ET

Please I am running aloan payment calculator, and get the following overflow message marked in yellow:

cPmt = cPrincipal * (fRate / (1 - (1 + fRate) ^ -nTerm))


Any explanations would be helpful

Herman Ortiz
ortizsr@joimail.com
 
(1 - (1 + fRate) ^ -nTerm))
can be 0 when fRate=0 or nTerm=0. In this case - you will end up deviding something by 0.
 
For Overflow errors try:
Dim cPmt As Double
Or
Dim cPmt As Long


Visit My Site
PROGRAMMER: (n) Red-eyed, mumbling mammal capable of conversing with inanimate objects.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top