FIX: VBS FormatCurrency() with Negative Value Asserts on Some Locales

Article translations Article translations
Article ID: 272502 - View products that this article applies to.
This article was previously published under Q272502
This article has been archived. It is offered "as is" and will no longer be updated.
Expand all | Collapse all

On This Page


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.


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   438,330   vbscript.dll


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


The following code segment demonstrates the problem:
      dim s
      SetLocale 1043
      s = formatCurrency("-11.25",,,-1)
The expected result is "(fl 1,125)". However, systems with this bug insert a trailing minus sign and may drop the closing parenthesis or add unnecessary characters.


For additional information about how to install Windows 2000 and Windows 2000 hotfixes at the same time, click the article number below to view the article in the Microsoft Knowledge Base:
249149 Installing Microsoft Windows 2000 and Windows 2000 Hotfixes


Article ID: 272502 - Last Review: October 21, 2013 - Revision: 3.2
  • Microsoft Windows 2000 Server
  • Microsoft Windows 2000 Advanced Server
  • Microsoft Windows 2000 Professional Edition
kbnosurvey kbarchive kbhotfixserver kbqfe kbbug kbfix kbwin2000presp2fix KB272502

Contact us for more help

Contact us for more help
Connect with Answer Desk for expert help.
Get more support from