Testing for different versions of Office

  • Thread starter Thread starter oldjay
  • Start date Start date
O

oldjay

I have the following macro that opens an access database. I have some people
that are using Access 2000. Is there any way I can test to see what version
they are using and open that Access version?


Private Sub CommandButton5_Click() 'Add new substrate

Dim X As String

X = Shell("C:\Program Files\Microsoft Office\Office11\MSACCESS.EXE
\\SERVER3\database\SUBSTRATES.MDB", 1)

oldjay

End Sub
 
I have a notes regarding finding out versions of excel file received . I wonder whether this will apply to access also

do not open
set your calc mode manual
shift open(to avoid an open event code that involves calcualtion)
in immedate window
?application.CalculationVersion
and hit enter key.
if it returns
114210 for xp
124519 for excel 2007
101716 windows xp excel 2002
(the first two numbers are for versions).


 
Following appears to work satisfactorily with Access 2002 and Access 2007.
You will need to test with other versions.

Sub TestAccessVersion()


'9 = Access 2000
'10 = Access 2002/XP
'11 = Access 2003
'12 = Access 2007

Dim objAccess As Object

Set objAccess = CreateObject("Access.Application")

MsgBox objAccess.Version

objAccess.Quit

Set objAccess = Nothing

End Sub
 
Back
Top