Home |
Search |
Today's Posts |
#1
|
|||
|
|||
Detecting version of Excel being used
I have a VBA program that I generated in Excel 2003 that will also be run by users who are still stuck with 97 and 2000. As part of the program, I generate some pivot tables. The problem is that the code for generating the pivot tables has to be different for 97 and 2000 users. My current solution is to pop up a message box asking them if they are using 2003, and if they answer "NO" then I call the code for generating the pivot tables in 97/2000 format. The problem is that some of the folks using this program will not know if they are using 2003 or not. Is there a VBA statement or a function out there that will tell me automatically what version of Excel the current user is running so that I do not have to rely on asking them and them actually knowing??? -- jim37055 ------------------------------------------------------------------------ jim37055's Profile: http://www.excelforum.com/member.php...o&userid=27788 View this thread: http://www.excelforum.com/showthread...hreadid=473755 |
#2
|
|||
|
|||
MsgBox "Welcome to Microsoft Excel version " & _
Application.Version & " running on " & _ Application.OperatingSystem & "!" -- Gary's Student "jim37055" wrote: I have a VBA program that I generated in Excel 2003 that will also be run by users who are still stuck with 97 and 2000. As part of the program, I generate some pivot tables. The problem is that the code for generating the pivot tables has to be different for 97 and 2000 users. My current solution is to pop up a message box asking them if they are using 2003, and if they answer "NO" then I call the code for generating the pivot tables in 97/2000 format. The problem is that some of the folks using this program will not know if they are using 2003 or not. Is there a VBA statement or a function out there that will tell me automatically what version of Excel the current user is running so that I do not have to rely on asking them and them actually knowing??? -- jim37055 ------------------------------------------------------------------------ jim37055's Profile: http://www.excelforum.com/member.php...o&userid=27788 View this thread: http://www.excelforum.com/showthread...hreadid=473755 |
#3
|
|||
|
|||
Hi there, In VBA there's a property of -ApplicationObject- called Version. In Excel 2000 it returns 9.0 for some reason. You'd have to check the ReturnValues of each Excel version you're interested in somewhere on the net. Then an IF-Statement would do, I think. Code: -------------------- If(Application.version = "9.0") then call excel2000_code -------------------- don't forget to insert the following ;) Code: -------------------- if(Application.version = "4.0") then msgbox("Phew, you should buy a new version of Excel, me, the little bothering HelpBot, suggests!") -------------------- Regards, Simon -- moondark ------------------------------------------------------------------------ moondark's Profile: http://www.excelforum.com/member.php...o&userid=27390 View this thread: http://www.excelforum.com/showthread...hreadid=473755 |
#4
|
|||
|
|||
Thanks Simon, I figured there had to be something like that out there.... I think our installed base only includes 97, 2000 and 2003 so it should not be too hard to figure out what values they return. -- jim37055 ------------------------------------------------------------------------ jim37055's Profile: http://www.excelforum.com/member.php...o&userid=27788 View this thread: http://www.excelforum.com/showthread...hreadid=473755 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Excel not detecting that a file is currently being edited | Excel Discussion (Misc queries) | |||
How to use later version Excel file in 4.0a? | Excel Discussion (Misc queries) | |||
Transfer "upgrade" version of Excel 97 to a new computer? | Excel Discussion (Misc queries) | |||
other systems detecting excel 4.0 if excel 2000 is installed | Setting up and Configuration of Excel | |||
I cant use englisch function names in a swedich version of excel | Excel Discussion (Misc queries) |