Microsoft KB Archive/190505

= BUG: Passing a Double Variable Causes Overflow Error in IDE =

Article ID: 190505

Article Last Modified on 5/13/2003

-

APPLIES TO


 * Microsoft Visual Basic 5.0 Learning Edition
 * Microsoft Visual Basic 6.0 Learning Edition
 * Microsoft Visual Basic 5.0 Professional Edition
 * Microsoft Visual Basic 6.0 Professional Edition
 * Microsoft Visual Basic 5.0 Enterprise Edition
 * Microsoft Visual Basic 6.0 Enterprise Edition

-



This article was previously published under Q190505



SYMPTOMS
If you pass a variable of type Double as a single argument to a sub or function, you may get the following error when you run the project in the design environment:

Run-time error "6" Overflow

However, when you compile the project and run it as a standalone executable, no overflow error is reported.



STATUS
Microsoft has confirmed this to be a bug in the Microsoft products listed at the beginning of this article. We are researching this bug and will post new information here in the Microsoft Knowledge Base as it becomes available.



Steps to Reproduce Behavior
 Create a Standard EXE project in Visual Basic. Form1 is created by default.  Paste the following code into the code window of Form1: Private Sub Form_Load Dim v As Double v = CDbl(3.1E+50) Test v     End Sub

Sub Test(ByVal X As Single) MsgBox X     End Sub  Press the F5 key to run the project. You get the following error message:

Run-time error "6" Overflow

 Compile the executable by clicking File, Make Project1.exe. Run the executable. Note that no overflow error is reported. Instead it prints out "1#.INF."

Additional query words: kbdss kbDSupport kbVBp kbVBp600bug kbNoKeyWord

Keywords: kbbug KB190505

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.