VB 6.0 - causes for run time error '6' overflow error

Asked By anitha satish on 09-Nov-05 11:28 PM
any ideas

Cause - Asked By F Cali on 09-Nov-05 11:48 PM

Hi anitha,

According to the following link:

http://support.microsoft.com/kb/q171837/

The cause of a runtime error '6' overflow error is as follows:

Visual Basic does not evaluate Byte data type correctly in the if expression when compiled to Native code with optimizations. 

Hope this helps.

If you are doing any mathematical - Asked By Sunitha Nambari on 10-Nov-05 12:25 AM

hi anitha,

              calcualtions,choosing a proper datatype is really imp,otherwise it shows weird errors like this.Visual Basic  makes certain compile-time assumptions about the numerical types of intermediate results in mathematical expressions.
These assumptions can sometimes lead to an "overflow" error at run time.

Regards,
Suneetha

Runtime Error 6 is Overflow - Asked By Venkat K on 10-Nov-05 12:09 PM

meaning that some number in the coding is too large for a Type to handle.
It's due to the usage of RTF forms/boxes in the application.

What versions of RTF are you using?

Versions:
RichEd20.dll --> 5.30.23.1221
RichEd32.dll --> 5.1.2600.0
RichTx32.ocx --> 6.1.97.82
Runtime Error 6 is Overflow - Asked By Venkat K on 10-Nov-05 12:09 PM
meaning that some number in the coding is too large for a Type to handle.

(OR)

It's also due to the usage of RTF forms/boxes in the application.

What versions of RTF are you using?

Versions:
RichEd20.dll --> 5.30.23.1221
RichEd32.dll --> 5.1.2600.0
RichTx32.ocx --> 6.1.97.82
The Reason is - Asked By Sameer Jain on 10-Nov-05 01:42 PM
I think you're trying to select a number into a variable that can't handle it. The limit on an integer type variable is 32768. Use a Long or Double instead and that should solve your problem
Error Trapping with Visual Basic for Applications - Asked By Sameer Jain on 10-Nov-05 01:45 PM
Hi

You can solve your problem by error trapping

by which you can stop the program from closing with an error

http://support.microsoft.com/?kbid=146864

Hope this helps you out