Help. Getting error retrieveing version number

  • Thread starter Thread starter c mateland
  • Start date Start date
C

c mateland

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!
 
Use the Val function

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

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