Microsoft KB Archive/272502

= FIX: VBS FormatCurrency with Negative Value Asserts on Some Locales =

Article ID: 272502

Article Last Modified on 2/23/2007

-

APPLIES TO


 * Microsoft Windows 2000 Server
 * Microsoft Windows 2000 Advanced Server
 * Microsoft Windows 2000 Professional Edition

-



This article was previously published under Q272502



SYMPTOMS
When Microsoft Visual Basic Scripting Edition (VBScript) code calls the SetLocale function with the Dutch locale ID (1043), and the FormatCurrency function is defined to indicate negative values, it may cause an assert and return the wrong value.



RESOLUTION
To resolve this problem, obtain the latest service pack for Windows 2000. For additional information, click the following article number to view the article in the Microsoft Knowledge Base:

260910 How to Obtain the Latest Windows 2000 Service Pack

The English version of this fix should have the following file attributes or later:

  Date        Time        Version      Size      File name --  8/28/2000   5:36:06PM   5.1.0.5628   438,330   vbscript.dll



STATUS
Microsoft has confirmed that this is a problem in Microsoft Windows 2000. This problem was first corrected in Windows 2000 Service Pack 2.



MORE INFORMATION
The following code segment demonstrates the problem:

dim s     SetLocale 1043 s = formatCurrency(&quot;-11.25&quot;,,,-1) MsgBox(s) The expected result is &quot;(fl 1,125)&quot;. However, systems with this bug insert a trailing minus sign and may drop the closing parenthesis or add unnecessary characters.