Hi Fred,
gebe bitte bei sowas immer den Thread bzw Code an auf den du dich beziehst.
K.Rola hat dir in https://www.herber.de/forum/archiv/568to572/t571439.htm#571482
den nachfolgenden Code gebastelt und da steckt ja schon der Ansatz der Lösung drinnen, SetLocaleInfo.
Gruß
Reinhard
Option Explicit
Declare Function GetLocaleInfo Lib "kernel32" Alias "GetLocaleInfoA" ( _
ByVal Locale As Long, ByVal LCType As Long, ByVal lpLCData As String, _
ByVal cchData As Long) As Long
Declare Function SetLocaleInfo Lib "kernel32" Alias "SetLocaleInfoA" ( _
ByVal Locale As Long, ByVal LCType As Long, ByVal lpLCData As String) As Boolean
Declare Function GetUserDefaultLCID Lib "kernel32" () As Long
Const LOCALE_SDECIMAL = &HE
Const LOCALE_STHOUSAND = &HF
Sub Tausender()
Dim lngID As Long, lngCVal As Long, msg As String
lngCVal = GetUserDefaultLCID()
msg = String(255, 0)
Call GetLocaleInfo(lngID, LOCALE_STHOUSAND, msg, 255)
msg = Left(msg, InStr(msg, Chr(0)) - 1)
MsgBox msg
End Sub
Sub Dezimal()
Dim lngID As Long, lngCVal As Long, msg As String
lngCVal = GetUserDefaultLCID()
msg = String(255, 0)
Call GetLocaleInfo(lngID, LOCALE_SDECIMAL, msg, 255)
msg = Left(msg, InStr(msg, Chr(0)) - 1)
MsgBox msg
End Sub