Checking a user's version of Excel

tmanger

Board Regular
Joined
Jul 15, 2002
Messages
101
Hello all,

Is there a simple way to check a user's version of Excel on opening the workbook?

For instance, I've been using Excel 2000 and XP for most of my programming. I would like to put a short bit of code in the Open Workbook module that will warn the user if they have an older version of Excel. I've searched the board, but to no avail.

Many thanks.

Tom.
 

Excel Facts

Does the VLOOKUP table have to be sorted?
No! when you are using an exact match, the VLOOKUP table can be in any order. Best-selling items at the top is actually the best.
You can use Application.Version like

If Application.Version < 9 Then


XL2000 was version 9 so that's why I used 9 here, per your example.
 
Upvote 0
And you should try using

If Val(Application.Version) < 9 Then

'cause sometimes the Version (which is a string) has more than numbers in it !!
 
Upvote 0
Yep, absolutely true, especially with Excel97, which is notorious for many things, testing for that alone would require something like
IF val(application.Version ) = 8 Then

or even more obnoxious, which I use for testing 97:
If Clng(Left(Application.Version,instr(Application.Version,".")-1)) = 8 Then

because in xl97, Application.Version can return something like 8.0e
 
Upvote 0
Thank you all for your suggestions. I'll play around and see if I can make it work.

As always, this board is a godsend.

Tom.
 
Upvote 0

Forum statistics

Threads
1,214,947
Messages
6,122,413
Members
449,082
Latest member
tish101

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