Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Disable 2003 VB code for users using older Excel
k, I don't remmeber who it was, but I saw VB code that was used incase your
were run a older vision of Excell other than 2003 or 2002. Any ideas? I belive it alow the VB code to work in older Excel spread sheet. thanks |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Disable 2003 VB code for users using older Excel
Check out VBA help on Application.Version to disable code for users with older
Excel If Application.Version < "10.0" Or Application.Version < "11.0" Then MsgBox "This utility will not work in your version of Excel, vbExclamation End End If Gord Dibben MS Excel MVP On Fri, 28 Sep 2007 16:50:00 -0700, pgarcia wrote: k, I don't remmeber who it was, but I saw VB code that was used incase your were run a older vision of Excell other than 2003 or 2002. Any ideas? I belive it alow the VB code to work in older Excel spread sheet. thanks |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Disable 2003 VB code for users using older Excel
Typo.......missed a double-quote after Excel
MsgBox "This utility will not work in your version of Excel", vbExclamation Gord On Fri, 28 Sep 2007 17:39:19 -0700, Gord Dibben <gorddibbATshawDOTca wrote: If Application.Version < "10.0" Or Application.Version < "11.0" Then MsgBox "This utility will not work in your version of Excel, vbExclamation End End If |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Disable 2003 VB code for users using older Excel
You can use the check that Gord mentions and then branch to code that only
newer versions support. For example, if they are running 2000 or newer you can branch to code that opens a form modelessly, otherwise your code will not branch and just run it modally. Since VBA is interpreted, Excel 97 never branches to the modeless subroutine and you don't get a compile or runtime error. Sorry I don't have time to show an example but I hope that helps. Doug "pgarcia" wrote in message ... k, I don't remmeber who it was, but I saw VB code that was used incase your were run a older vision of Excell other than 2003 or 2002. Any ideas? I belive it alow the VB code to work in older Excel spread sheet. thanks |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
Disable 2003 VB code for users using older Excel
To avoid problems use in non US systems use
If Val(Application.Version) < 10 In Dutch it is 10,0 instead if 10.0 for example -- Regards Ron de Bruin http://www.rondebruin.nl/tips.htm "Gord Dibben" <gorddibbATshawDOTca wrote in message ... Typo.......missed a double-quote after Excel MsgBox "This utility will not work in your version of Excel", vbExclamation Gord On Fri, 28 Sep 2007 17:39:19 -0700, Gord Dibben <gorddibbATshawDOTca wrote: If Application.Version < "10.0" Or Application.Version < "11.0" Then MsgBox "This utility will not work in your version of Excel, vbExclamation End End If |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
disable users from editing an excel sheet once they open | Excel Discussion (Misc queries) | |||
using Excel 2003 protected sheets with older versions of Excel | Excel Discussion (Misc queries) | |||
Any way to save VBA code so it works with older Excel revisions? | Excel Programming | |||
Using Older versions of ms excel with 2003 | Excel Programming | |||
Code for runnning macros created in XP in older excel versions | Excel Programming |