'需引用mso.dll micrsoft office 10.0 object library
Private Sub 命令0_Click()
MsgBox "你使用的是" & CHKAccessVer & ChkLanguage & "版" & vbCrLf & "Office安装路径为" & vbCrLf & Application.SysCmd(acSysCmdAccessDir)
End Sub
Function ChkLanguage()
Select Case Application.LanguageSettings.LanguageID(msoLanguageIDUI)
Case 1028: lgg = "繁体"
Case 2052: lgg = "简体"
Case Else: lgg = "未知" & Application.LanguageSettings.LanguageID(msoLanguageIDUI)
End Select
ChkLanguage = lgg
End Function
Function CHKAccessVer()
Select Case Application.SysCmd(acSysCmdAccessVer)
Case 9
CHKAccessVer = "ACCESS 2000"
Case 10
CHKAccessVer = "ACCESS XP (2002)"
Case 11
CHKAccessVer = "ACCESS 2003"
Case Else
CHKAccessVer = "未知版本" & Application.SysCmd(acSysCmdAccessVer)
End Select
End Function
Public Function cweek(xx_date As Date)
Dim newyear As Date
newyear = Format(Year(xx_date) & "-01-01", "yyyy-mm-dd")
cweek = Int((xx_date + Weekday(newyear) - newyear - 1) / 7) + 1
End Function