Excel 97-2007

  • Thread starter Thread starter Fred
  • Start date Start date
F

Fred

I need to know if the application running my macro is Excel 97 or Excel
2007.
Is there a way to find out?

Thanks
Fred
 
Application.version returns a number. the ones with questions I 'm not sure.

Excel 95 = 7.0
Excel 98 = 8.0
Excel 2002 = 9.0 ????
Excel 2003 = 10.0
Excel 2005 = 11.0 ????
Excel 2007 = 12.0 ????
 
Application.Version will give you the version number of the Excel that is
running your code.

Rick
 
There was an Excel 2005?

Joel said:
Application.version returns a number. the ones with questions I 'm not sure.

Excel 95 = 7.0
Excel 98 = 8.0
Excel 2002 = 9.0 ????
Excel 2003 = 10.0
Excel 2005 = 11.0 ????
Excel 2007 = 12.0 ????
 
97 = 8.0
2000 = 9.0
2002 = 10.0
2003 = 11.0
2007 = 12.0

98 and 2005 must be for the Mac.

Don't know about them.


Gord Dibben MS Excel MVP
 
Hi Fred

If you test it with
Application.Version

Always use Val like this

If Val(Application.Version) < 12 Then

For example
Application.Version will give thison my US system with Excel 2007
12.0
and this on my Dutch system
12,0

Use Val(Application.Version) to avoid problem

12=2007
11=2003
10=2002
9=2000
8=97
 
Back
Top