VarCyFromStr() Returns an Incorrect Value in Windows XP

Article translations Article translations
Article ID: 321395 - View products that this article applies to.
This article was previously published under Q321395
Expand all | Collapse all


If you pass a value directly to a function, the function may not work. The following sample code fragment demonstrates this issue:
Private Sub Command1_Click()
Debug.Print CCur("0.28042328042328") 'Does not work
End Sub


To resolve this problem, obtain the latest service pack for Windows XP. For additional information, click the following article number to view the article in the Microsoft Knowledge Base:
322389 How to Obtain the Latest Windows XP Service Pack
The English version of this fix should have the following file attributes or later:
   Date         Time   Version      Size     File name
   05-Jun-2002  11:26  3.50.5014.0   77,824  Asycfilt.dll
   05-Jun-2002  11:17  3.50.5016.0  569,344  Oleaut32.dll
   05-Jun-2002  11:26  5.0.5014.0   106,496  Olepro32.dll


To work around this problem, pass the value to the function through a variable. The following sample code fragment demonstrates this method:
Private Sub Command1_Click()
Dim d As Double
d = CDbl("0.28042328042328")
Debug.Print CCur(d) 'Works correctly
End Sub


Microsoft has confirmed that this is a problem in the Microsoft products that are listed at the beginning of this article. This problem was first corrected in Windows XP Service Pack 1.


Article ID: 321395 - Last Review: June 5, 2007 - Revision: 1.3
  • Microsoft Windows XP Home Edition
  • Microsoft Windows XP Professional
kbhotfixserver kbqfe kbbug kbfix kbsysadmin kbwinxpsp1fix KB321395

Give Feedback


Contact us for more help

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