VarCyFromStr() Returns an Incorrect Value in Windows XP (321395)
The information in this article applies to:
- Microsoft Windows XP Home Edition
- Microsoft Windows XP Professional
This article was previously published under Q321395 SYMPTOMS
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
RESOLUTIONTo 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
WORKAROUND
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
STATUSMicrosoft 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.
Modification Type: | Minor | Last Reviewed: | 9/27/2005 |
---|
Keywords: | kbHotfixServer kbQFE kbbug kbfix kbSysAdmin kbWinXPsp1fix KB321395 |
---|
|