Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Checking for Excel Version... 1

Status
Not open for further replies.

herjari

Programmer
Nov 27, 2002
12
AR
I´m creating an application that needs Excel 9.0 or later to work properly.

The question is "how do I check which version is the user using?, is there any way to check this?"

Thank you very much in advance,

Hernan
 
YOU COULD USE THE COMMAND

Application.Version

AND THIS WILL GIVE YOU THE VERSION NUMBER

TO CHECK THIS YOU COULD JUST PUT IN A MSGBOX

MsgBox "" & Application.Version & ""

:)
ANDREW299

 
Thank you very much for your prompt reply. Actually, I´m doing the following:

If CLng(Excel.Application.Version) < 90 Then
MsgBox &quot; Yo need Excel 2000 or later...&quot;, vbExclamation, &quot;Alerta&quot;
End If

This isn´t working correctly in almost any computer I tried it but it worked just fine on two. Is there any other to compare versions or, at least, be sure that the current version is older than 9.0?

Thank you again,

Hernan
 
Unfortunately I havent got any other computers to try this code out available to me at the moment but why not try

If Application.Version < 9 Then
MsgBox &quot;You need .... You are currently running version &quot; & Application.Version & &quot;&quot;
End If

To compare different versions of excel use the

Application.CalculationVersion

command, example below



dim diffversion

If Application.CalculationVersion <> _
Workbooks(1).CalculationVersion Then
diffversion = True
Else
diffversion = False
End If

This returns true if the version of excel thats running is different to the previous one it was calculated in and false if they are the same.

Any use?
Andrew299

 
Thank you very much. It worked perfect!!

Hernan
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top