Checking version of Excel from VBA in Access?

K

Kjell

Hi,
How will the VBA-code look like to check which version an Office-program
(Excel)has. I need to do so and quit the macro if the Office program is too
old.
 
D

Dirk

Assuming you want to check wether it's Excel 2003 (untested):

Dim objExcel as Object
Set objExcel = CreateObject("Excel.Application")
If objExcel.Version < 11.0 Then
MsgBox "Excel needs to be at least version 2003"
Exit Sub
End If
 
Top