GetDecimalSpecifier




Public Function GetDecimalSpecifier() As String
'

' This function returns the correct Decimal Specifier for the system Locale

'

Dim lBuffLen As Long
Dim sBuffer As String
Dim sDecimal As String
Dim lResult As Long

On Error GoTo vbErrorHandler

lBuffLen = 128

sBuffer = String$(lBuffLen, vbNullChar)

lResult = GetLocaleInfo(LOCALE_USER_DEFAULT, LOCALE_SDECIMAL, sBuffer, lBuffLen)
sDecimal = Left$(sBuffer, lResult - 1)

GetDecimalSpecifier = sDecimal

Exit Function

vbErrorHandler:
'

' Handle the errors here

'

End Function










( getdecimalspecifier.html )- by Paolo Puglisi - Modifica del 17/12/2023