Determine if the Excel Version is 2007 or previous

S

Subodh

I want to determine if the user has Excel Version 2007 or previous
one.
If the version is 2007 then i want to run one code
else the other one
I tried Application.version but it gave 12 as the version number for
Excel 2007
I want to do the following

If application version is 2007 then
.......................
...............run this code
else if previous version
...........
............. run this code
end if
 
R

Roger Govier

Hi

You need

If Val(Appication.version) = 12 Then
some code
Elae
Some other code
End if
 
P

Peter T

.... or with 2010 just around the corner

If Val(AppLication.version) >= 12 Then

Regards,
Peter T
 
R

Roger Govier

Quite right, Peter!
Far too blinkered a view on my part.
(Might also help if I could spell "else")
 

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