Private Declare Function GetSystemDefaultLCID Lib "Kernel32" () As Long
Private Declare Function SetLocaleInfo Lib "Kernel32" Alias "SetLocaleInfoW" ( _
                                 ByVal Locale As Long, _
                                 ByVal LCType As Long, _
                                 ByVal lpLCData As Long) As LongPrivate Sub Command1_Click()
   Dim dwLCID  As Long   Me.Cls
   dwLCID = GetSystemDefaultLCID()
   ' 不显示前导0
   SetLocaleInfo dwLCID, 18, StrPtr("0")
   Me.Print 7 / 19
   ' 显示前导0
   SetLocaleInfo dwLCID, 18, StrPtr("1")
   Me.Print 7 / 19
End Sub我的是WinXP,运行正常。
在Win7下运行,是否需要管理员权限,楼主自己试验。
如果需要管理员权限、并在标准账户下运行,楼主自己解决提权问题。