Which Excel Version is user opening?

Robb

Board Regular
Joined
Feb 17, 2002
Messages
145
How can I tell what Excel version the user is opening my program with? '97, 2000, 2002?

I need to know this because some of my VBA Code (written for 97) does not work in 2000 or 2002. But if I knew what Excel version they were using I could get around this.
 

Excel Facts

Test for Multiple Conditions in IF?
Use AND(test, test, test, test) or OR(test, test, test, ...) as the logical_test argument of IF.
MS, they use "Release" numbers and those numbers do not match the version number used in the name. For Excel the six digit number format is product name: x.x and the product ".dll" release used: .xxxx

But, for some other Office products you may get a 7 digit "release" number, MS is not consistant, except for making it difficult to find even simple information out about its products, they learned this from "IBM."

So for Excel 2000 you may get: 9.0.2743

The way to get this is with the Sheet Formula:

="Release: " & INFO("release")

in any cell.

MicroSoft does not have a list on its web site indicating which number go's with which version?

I have looked in the past and today, I searched all the Microsoft sub-sites using:

Excel release by number, Excel version release, Excel release, Release reference, releases and release, no luck?

So unless you get everyone to click their "Help-About Microsoft Excel" and post what version name go's with what "release" for the Excel they are using, I don't know?

You will need the first two numbers only though as the ".dll" number is for service updates. Then you can build a "Case" macro for the filtered, two digit number release version, returned by the Worksheetfunction: INFO (note: the value returned is "text" even though it looks like a number!). Then do a case lookup for what Excel version go's with what numbers. JSW
 
Upvote 0
Sub ExcelVersion()
MsgBox (Val(Application.Version))
End Sub


97 returns 8, 2000 9 and XP 10.
 
Upvote 0
there is a link on the j-walk website under the history of the spreadsheet that will tell you what the release number is for each version of excel going all the way back to the beginning. the link is:

http://j-walk.com/ss/excel/index.htm

kevin
 
Upvote 0
Robb,
did you want to make something special happen if someone trying to access the file is not using the right version of excel, for example, if you wanted to you could alter your code so that if the user is using a version that is incompatible w/ your macro, they will get a message box telling that - you could even go as far as to insert code so that if the version is incompatible the sub routine would end
 
Upvote 0
Thanx everybody, you answered my question!

The reason I asked was to turn off the AutoSave add-in when the user opens the program. The add-in is named differently in '97 and 2000. I haven't checked to see what they called it in 2002.

Again thanx!!
 
Upvote 0

Forum statistics

Threads
1,214,651
Messages
6,120,739
Members
448,989
Latest member
mariah3

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top