Help in using Application.Version

  • Thread starter Thread starter O'Neal
  • Start date Start date
O

O'Neal

I've been using the Application.Version function in excel
to determine the current version of the client machines.
For office xp, the version is 10.0. But in some machines
in Germany, the value returned is 100. I'm not sure if
there's a difference between the european version and us
version. Would somebody know why this is happening?
Another thing, where can I find the version being
returned? Is it in the registry?

Thanks in advance for your help!
 
Hi

Do you perform some number manipulation with it after reading ? Here
(Norway, Europe, XL2000) it returns "9.0" as string, but our decimal
separator is comma.

Val(Application.Version)
is internationally safe, while
CDbl(Application.Version)
is not, it depends on the regional settings in Control panel.
 
Hello,

No, I only use it as checking to ensure that the user has
the correct version before running another script.
Actually, I've also heard before that the decimal
separator is different - and since the difference might
just be apoint, we tried to assign the application.version
value to an integer but it still returns a 100 value.
 
BTW, I've asked the development team to try the VAL
function - hopefully, this will work.

Thanks!
 
Very strange. Well, Version returns a string, and any conversion may or may
not cause problems. Val should be pretty safe, but consider also direct
string comparison as in

If Application.Version Like "10.*" Then

HTH. Best wishes Harald
 
Whether its a string or not, the OP says it returns 100. Maybe Msoft is not
correct about what it returns in Gemany, (personally i dont like relying on
MSoft documentation) in which case

iVersion=cint(left(cstr(application.version),2))

will work until we get to version 100.
Seems safer to me.

Charles
______________________
Decision Models
FastExcel Version 2 now available.
www.DecisionModels.com/FxlV2WhatsNew.htm
 
? cint("10,0")
100

in a later posting the OP said they are trying to assign application.version
to an integer variable. Above might be a source of the problem although he
did say also returns 100.

Of course Frank is sitting in Frankfurt, but hasn't weighed in on this for
some reason.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top