![]() |
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 |
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 |
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 |
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 |
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 |
All times are GMT +1. The time now is 05:39 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com