The Application object has a Version property that returns the version number (and sometimes letters) of the Excel instance that’s running.
Version always returns a string, but VBA can convert it to a number without much fuss. Unless, that is, the version number contains nonnumerical characters. In my Excel97, Application.Version returns 8.0e.
If you need to test the version to, for instance, stop the program for unsupported versions, you can use the Val function to just get the number.
If Val(Application.Version) < 9 Then
MsgBox “You must have Excel 2000 or higher”
‘Do other stuff