Use the SetLocaleInfo function for this.
eg
Code:Private Declare Function SetLocaleInfo Lib "kernel32" Alias "SetLocaleInfoA" (ByVal Locale As Long, ByVal LCType As Long, ByVal lpLCData As String) As Long Private Const LOCALE_SDECIMAL = &HE ' decimal separator Private Const LOCALE_STHOUSAND = &HF ' thousand separator Private Const LOCALE_USER_DEFAULT = &H400 Private Sub Command1_Click() Dim sLocale As String Dim retVal As Long sLocale = "." retVal = SetLocaleInfo(LOCALE_USER_DEFAULT, LOCALE_SDECIMAL, sLocale) End Sub




Reply With Quote