[INCLUDE]
GetLocaleInfo

[CODE]
Public Function DoubleToLocalString(ByVal xFloat As Double, Optional ByVal NumDecDigits As Long = 2&, Optional ByVal RoundIt As Boolean = True)
  Dim xChar1 As String
  Dim xChar2 As String
  Dim xLong1 As Long

  If NumDecDigits < 1& Then
    DoubleToLocalString = CStr(Fix(xFloat + -0.5 * CLng(RoundIt)))
    Else
    DoubleToLocalString = CStr(Fix(xFloat * (10& ^ NumDecDigits) + 0.5))
'    Stop
    xLong1 = NumDecDigits + 1& - Len(DoubleToLocalString)
    
    If xLong1 > 0& Then
      DoubleToLocalString = String(xLong1, vbNullChar) + DoubleToLocalString
      End If
    xChar1 = GetLocaleInfo(&HE&)
    If Len(xChar1) = 0& Then xChar1 = "."
    DoubleToLocalString = Left(DoubleToLocalString, Len(DoubleToLocalString) - NumDecDigits) + xChar1 + Right(DoubleToLocalString, NumDecDigits)
    End If
  End Function
