Testing for different versions of Office

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
 
O

OssieMac

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top