Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 141
Default Excel version comparison

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
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7,247
Default Excel version comparison

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" wrote in message
...
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



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 141
Default Excel version comparison

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" wrote in

message
...
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



.

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,337
Default Excel version comparison

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

"Steve" wrote in message
...
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



  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,824
Default Excel version comparison

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



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Saving a newer version of Excel using an older version (Excel 97) Alain Dekker Excel Discussion (Misc queries) 7 April 3rd 10 11:02 PM
How do I save an Excel 97-2003 version or 2007 version for Mac 200 Bronigal Excel Discussion (Misc queries) 1 December 7th 09 08:04 AM
Recover earlier version of excel sheet after new version saved? stephanie38 Excel Discussion (Misc queries) 3 June 17th 05 03:52 AM
How can I update the version of Excel 2000 9.0 to version 10.0 Ramsey Can Excel Discussion (Misc queries) 1 May 11th 05 03:28 PM
VBA Function Version Comparison Sheela Excel Programming 0 August 15th 03 09:34 AM


All times are GMT +1. The time now is 12:22 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"