Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 29
Default Find Excel Version

I need an API (I think) to find out the Excel version of the current user.
Based on that information I am going to create different macros.
I made a spreadsheet with a "Sort" button in Excel 2003. One of my users is
on Excel 2000, and it gives them a "variable not defined" error when trying
to run the macro. So I was going to record it in Excel 2000 also, then when
they click sort, figure which version they are running, and select the
appropriate macro.
I'm basically a noob at programming, so any help is appreciated.
Thanks
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7,247
Default Find Excel Version

You can use Application.Version to return the version of Excel.

Select Case CInt(Application.Version)
Case 8 ' 97
Case 9 ' 2000
Case 10 ' 2002
Case 11 ' 2003
Case 12 ' not yet..
End Select



--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com



"jweasl" wrote in message
...
I need an API (I think) to find out the Excel version of the
current user.
Based on that information I am going to create different
macros.
I made a spreadsheet with a "Sort" button in Excel 2003. One of
my users is
on Excel 2000, and it gives them a "variable not defined" error
when trying
to run the macro. So I was going to record it in Excel 2000
also, then when
they click sort, figure which version they are running, and
select the
appropriate macro.
I'm basically a noob at programming, so any help is
appreciated.
Thanks



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default Find Excel Version

Hi jweasl

You can use
If Val(Application.Version) = 9 Then


--
Regards Ron de Bruin
http://www.rondebruin.nl


"jweasl" wrote in message ...
I need an API (I think) to find out the Excel version of the current user.
Based on that information I am going to create different macros.
I made a spreadsheet with a "Sort" button in Excel 2003. One of my users is
on Excel 2000, and it gives them a "variable not defined" error when trying
to run the macro. So I was going to record it in Excel 2000 also, then when
they click sort, figure which version they are running, and select the
appropriate macro.
I'm basically a noob at programming, so any help is appreciated.
Thanks



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How do you find the version of the EXCEL program??? Renee Excel Discussion (Misc queries) 3 September 22nd 09 04:46 PM
How do I find/open older version of file in Excel 2007? GJSchmitz Excel Discussion (Misc queries) 1 February 16th 09 01:27 PM
download trial version excel 2003? can only find trial version 200 susan Excel Discussion (Misc queries) 2 November 7th 07 03:19 AM
Find Version of Excel workbook is saved as Barb Reinhardt Excel Discussion (Misc queries) 0 August 31st 07 02:00 PM
How to find the version of Excel in code WayneM Excel Programming 2 September 23rd 03 10:02 PM


All times are GMT +1. The time now is 01:56 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"