PRB: CSng/CDbl Not Using Regional Settings for Decimal Symbol
Article ID: 198098
Article Last Modified on 5/12/2003
APPLIES TO
- Microsoft Visual Basic 6.0 Learning Edition
- Microsoft Visual Basic 6.0 Professional Edition
- Microsoft Visual Basic 6.0 Enterprise Edition
This article was previously published under Q198098
SYMPTOMS
When you change the Regional Settings to make the Number's decimal symbol
the same as the Currency's "digit grouping symbol," CSng does not interpret
this character as a decimal point. Therefore, you get a different result
that you would have in Visual Basic 5.0. This is also the case for the CDbl
function.
CAUSE
The new oleaut32 checks to see if the character is the Currency "digit
grouping symbol" first. If it is, then even if it's also the Number's
decimal symbol, it will be considered as the Currency "digit grouping
symbol" instead of the Number's decimal symbol.
RESOLUTION
Resolve the conflicting by using the Regional Settings in the Control Panel
on the Start menu.
STATUS
This behavior is by design.
Keywords: kbprb KB198098