Microsoft KB Archive/95431

= FIX: Type Mismatch Error If Use VAL Function on Big Hex Value =

Article ID: 95431

Article Last Modified on 8/16/2005

-

APPLIES TO


 * Microsoft Visual Basic 2.0 Standard Edition
 * Microsoft Visual Basic 3.0 Professional Edition
 * Microsoft Visual Basic 2.0 Professional Edition
 * Microsoft Visual Basic 3.0 Professional Edition
 * Microsoft Visual Basic 1.0 Standard Edition
 * Microsoft Visual Basic for MS-DOS
 * Microsoft Cinemania 97 Standard Edition
 * Microsoft QuickBasic 4.5 for MS-DOS

-



This article was previously published under Q95431



SYMPTOMS
Using the VAL function on a large hexadecimal number (greater than or equal to the hexadecimal value 80000000) embedded in a string can incorrectly cause a &quot;Type mismatch&quot; error. This occurs only when the hexadecimal number contains an ampersand (&) at the end of the string.



WORKAROUND
To reproduce the problem run the following code: PRINT VAL(&quot;&H80000000&&quot;) You get a &quot;Type mismatch&quot; error. To prevent the error, remove the last ampersand (&) character.



STATUS
Microsoft has confirmed this to be a bug in the Microsoft products listed at the beginning of this article. This problem has been corrected in Visual Basic version 4.0.

Additional query words: buglist2.00 buglist1.00 buglist4.50 buglist7.10 buglist3.00 2.00 3.00 4.50 7.10 fixlist4.00

Keywords: kbbug kbfix KB95431

-

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

© Microsoft Corporation. All rights reserved.