Версия MS Access - Полный номер билда
Dim sResult As String
sResult = Application.Version & "." & Application.Build & ".0000"
Изощьрённый вариант:
Public Function GetAccessBuildNo() As String
Dim FSO As Object
Dim sResult As String
On Error GoTo GetAccessBuildNo_Err
Set FSO = CreateObject("Scripting.FileSystemObject")
sResult = SysCmd(acSysCmdAccessDir) & "msaccess.exe"
sResult = FSO.GetFileVersion(sResult)
If Len(sResult) = 0 Then
sResult = Application.Version & "." & Application.Build & ".0000"
End If
GetAccessBuildNo = sResult
GetAccessBuildNo_End:
On Error Resume Next
If Not FSO Is Nothing Then Set FSO = Nothing
Err.Clear
Exit Function
GetAccessBuildNo_Err:
MsgBox "Error " & Err.Number & " (" & Err.Description & ") in Function" & _
"GetAccessBuildNo - In Module [...].", vbCritical, "Произошла ошибка!"
Err.Clear
Resume GetAccessBuildNo_End
End Function
|