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

Is there a problem with eliminating VersionString and VersionNumber and
simply using

If Application.Version = 9

Alan Beban

amescha wrote:


"amescha" wrote:


Hello All,

I am looking for a listing of MS Excel verions (releases). I have searched "all of Microsoft.com" to no avail. Specifically I want to keep a VBA procedure from running if the user has anything less than releases 9.0x or 10.0x. The procedure creates a Pivot Table and Pivot Chart which requires the aforesaid two versions. I was considering using a Select Case statement that would result in an appropriate message box and "Exit Sub" unless a version that handles Pivot Charts is being used. Thanks in Advance!



I have come up with a solution to my own problem, perhaps not the most elegant but it does work on versions 8.0x, 9.0x and 10.0x, the relevant part of the code is:

Dim VersionString As String
Dim VersionNumber As Double
VersionString = Application.Version
VersionNumber = Val(VersionString)
MsgBox "This is MS Excel version " & VersionNumber
If VersionNumber = 9 Then
MsgBox "Go ahead and build your Pivot Chart"
Else
MsgBox "Sorry, this version does not support Pivot Charts!"
Exit Sub
End If

Still I welcome further comment,

amescha

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
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
Anyone have an Excel template for Skeet /Trap Scores? Ed in Mesquite, TX Excel Discussion (Misc queries) 2 July 16th 06 11:14 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
Trap Excel events from VB pat Excel Programming 0 August 18th 03 11:01 PM


All times are GMT +1. The time now is 11:07 AM.

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"