View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Ron de Bruin Ron de Bruin is offline
external usenet poster
 
Posts: 11,123
Default Help. Getting error retrieveing version number

Use the Val function

If Val(Application.Version) < 9 Or Val(Application.Version) 11 Then
.........................

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



"c mateland" wrote in message ups.com...
I use the following code to get the application's version.

Dim iAppVer As Integer
iAppVer = CInt(Left(CStr(Application.Version), 2))

Because Application.Version returns a string, the code converts to a
value. Yes, I do realize as a string I can perform comparisons like
numbers, but I found that is NOT true when working with computers using
MUI (Mulitlingual User Interface). Specifically when switched to
French, I'm forced to convert to value or else it will error as a
string. Doing so fixed my French problem. So, this code has been
working great for both MUI and non-MUI machines.

Except now I have machines in Norway getting errors with this section
of code. They run English non-MUI computers with v2000 Office. My US
and UK users have the same setup and no problems, so I shouldn't be
having this problem in Norway.

Anyway, I'm getting a Type 13 Mismatch on this section of code. Any
ideas? Any other ways to code this that will work with MUI's (French)
and other machines?

Thanks!