Home All Groups Group Topic Archive Search About
Author
24 May 2009 5:17 AM
10_a_c
Hello:


Everything was fine until I tried my code on another laptop with Excel 2007
and the new file extensions. Trying to get my VB code to tell the difference
between Excel 2003 or 2007. Is there an API or Function call that can do this?

Thanks in advance for any and all assistance.

Author
25 May 2009 4:12 PM
Peter T
Assuming you are already automating an instance on Excel

xlVer = Val(Left$(xlApp.Version, 2))

8, 9, 10, 11, 12 ' next one will be 14
97, 2000, 2002, 2003, 2007

If you are not automating Excel, you can get the "current Version" from the
registry or search examples of FindExecutable in this group.

If you are working with Excel's object model there might be several other
things you might need to do differently in 2007

Regards,
Peter T


Show quoteHide quote
"10_a_c" <1***@discussions.microsoft.com> wrote in message
news:67AF6190-D657-40B5-9146-C4582EAEDD8C@microsoft.com...
> Hello:
>
>
> Everything was fine until I tried my code on another laptop with Excel
> 2007
> and the new file extensions. Trying to get my VB code to tell the
> difference
> between Excel 2003 or 2007. Is there an API or Function call that can do
> this?
>
> Thanks in advance for any and all assistance.
>
>
Author
26 May 2009 8:00 AM
Jan Hyde
10_a_c <1***@discussions.microsoft.com>'s wild thoughts were
released on Sat, 23 May 2009 22:17:04 -0700 bearing the
following fruit:

>Hello:
>
>
>Everything was fine until I tried my code on another laptop with Excel 2007
>and the new file extensions. Trying to get my VB code to tell the difference
>between Excel 2003 or 2007. Is there an API or Function call that can do this?
>
>Thanks in advance for any and all assistance.

I'd like to see the code because it shouldn't make a
difference (as far as VB is concerend) what the file
extension is.



--
Jan Hyde