'***********************************************************' 'Uses Win32Api ' 'By Sri ' 'Code to Set Date Format ' 'Used VB and api to Set Date Format ' '***********************************************************' 'Steps 'create new project add a standard module to it remove form from the project 'copy following code to standard module Option Explicit Public Const LOCALE_SSHORTDATE = &H1F Public Const WM_SETTINGCHANGE = &H1A Public Const HWND_BROADCAST = &HFFFF& Public Declare Function SetLocaleInfo Lib "Kernel32" Alias "SetLocaleInfoA" (ByVal Locale As Long, ByVal LCType As Long, ByVal lpLCData As String) As Boolean Public Declare Function PostMessage Lib "user32" Alias "PostMessageA" (ByVal hwnd As Long, ByVal wMsg As Long, ByVal wParam As Long, ByVal lParam As Long) As Long Public Declare Function GetSystemDefaultLCID Lib "Kernel32" () As Long Public Sub prcseregtime() On Error GoTo errh Dim dwLCID As Long Dim dateFormat As String dateFormat = "dd/MM/yy" 'change the format according to requirement dwLCID = GetSystemDefaultLCID() If SetLocaleInfo(dwLCID, LOCALE_SSHORTDATE, dateFormat) = False Then MsgBox "Failed" Exit Sub End If PostMessage HWND_BROADCAST, WM_SETTINGCHANGE, 0, 0 MsgBox "Date Format is Changed", vbInformation Exit Sub errh: MsgBox Err.Description End Sub Public Sub main() Call prcseregtime End Sub