PC Review


Reply
Thread Tools Rate Thread

Excel version comparison

 
 
Steve
Guest
Posts: n/a
 
      17th Dec 2003
How can I compare excel versions. I want to say

"every version above 7.999" The problem is sometimes I
get a version = 8.0a

I could parse the number out of the version string, but
I'm thinking there is a "correct" way of doing this.

This thing has to work for Excel95, 97, 2002 and 2003
 
Reply With Quote
 
 
 
 
Chip Pearson
Guest
Posts: n/a
 
      18th Dec 2003
Use something like

Dim Vers As Integer
Vers = Val(Application.Version)


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com


"Steve" <(E-Mail Removed)> wrote in message
news:02df01c3c4f0$9046a590$(E-Mail Removed)...
> How can I compare excel versions. I want to say
>
> "every version above 7.999" The problem is sometimes I
> get a version = 8.0a
>
> I could parse the number out of the version string, but
> I'm thinking there is a "correct" way of doing this.
>
> This thing has to work for Excel95, 97, 2002 and 2003



 
Reply With Quote
 
 
 
 
Don Guillett
Guest
Posts: n/a
 
      18th Dec 2003
try this. I just tested in xl95 (vers 7) ,xl97sr2 (vers 8.0a) and xl2002
(vers 10)

Sub WhatVersion()
x = Int(Left(Application.Version, _
Len(Application.Version) - 1))
MsgBox x
End Sub

--
Don Guillett
SalesAid Software
(E-Mail Removed)
"Steve" <(E-Mail Removed)> wrote in message
news:02df01c3c4f0$9046a590$(E-Mail Removed)...
> How can I compare excel versions. I want to say
>
> "every version above 7.999" The problem is sometimes I
> get a version = 8.0a
>
> I could parse the number out of the version string, but
> I'm thinking there is a "correct" way of doing this.
>
> This thing has to work for Excel95, 97, 2002 and 2003



 
Reply With Quote
 
steve
Guest
Posts: n/a
 
      18th Dec 2003
Thanks Chip.

I can't believe I've coded VB for 10 years and haven't
used VAL

I have seen it before, but I just never used it and
didn't remember it.

Again Thanks.


>-----Original Message-----
>Use something like
>
>Dim Vers As Integer
>Vers = Val(Application.Version)
>
>
>--
>Cordially,
>Chip Pearson
>Microsoft MVP - Excel
>Pearson Software Consulting, LLC
>www.cpearson.com
>
>
>"Steve" <(E-Mail Removed)> wrote in

message
>news:02df01c3c4f0$9046a590$(E-Mail Removed)...
>> How can I compare excel versions. I want to say
>>
>> "every version above 7.999" The problem is sometimes I
>> get a version = 8.0a
>>
>> I could parse the number out of the version string, but
>> I'm thinking there is a "correct" way of doing this.
>>
>> This thing has to work for Excel95, 97, 2002 and 2003

>
>
>.
>

 
Reply With Quote
 
Dave Peterson
Guest
Posts: n/a
 
      18th Dec 2003
MsgBox Val("8.33a")
returns 8.33

if val(application.version) >= 8 then

might be what you want.

Steve wrote:
>
> How can I compare excel versions. I want to say
>
> "every version above 7.999" The problem is sometimes I
> get a version = 8.0a
>
> I could parse the number out of the version string, but
> I'm thinking there is a "correct" way of doing this.
>
> This thing has to work for Excel95, 97, 2002 and 2003


--

Dave Peterson
(E-Mail Removed)
 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Where to get stand alone Dot Net Framework version 1.1, version 2.0,version 3.0, version 3.5, version 2.0 SP1, version 3.0 SP1 ? pg Windows XP General 11 9th Feb 2008 02:55 AM
Where to get stand alone Dot Net Framework version 1.1, version 2.0,version 3.0, version 3.5, version 2.0 SP1, version 3.0 SP1 ? pg Microsoft Dot NET 11 9th Feb 2008 02:55 AM
Re: Where to get stand alone Dot Net Framework version 1.1, version 2.0, version 3.0, version 3.5, version 2.0 SP1, version 3.0 SP1 ? PA Bear [MS MVP] Windows XP Help 0 5th Feb 2008 04:28 AM
Re: Where to get stand alone Dot Net Framework version 1.1, version 2.0, version 3.0, version 3.5, version 2.0 SP1, version 3.0 SP1 ? V Green Windows XP Help 0 5th Feb 2008 03:45 AM
Re: Where to get stand alone Dot Net Framework version 1.1, version 2.0, version 3.0, version 3.5, version 2.0 SP1, version 3.0 SP1 ? V Green Microsoft ASP .NET 0 5th Feb 2008 03:45 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 10:59 AM.