Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 304
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 22,906
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 22,906
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 63
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default 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
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
disable users from editing an excel sheet once they open Pietro Excel Discussion (Misc queries) 0 September 29th 07 02:26 PM
using Excel 2003 protected sheets with older versions of Excel lisad Excel Discussion (Misc queries) 0 March 28th 07 05:52 PM
Any way to save VBA code so it works with older Excel revisions? fugazi48 Excel Programming 2 May 16th 06 01:59 PM
Using Older versions of ms excel with 2003 BassJay Excel Programming 1 October 18th 05 06:41 PM
Code for runnning macros created in XP in older excel versions Tom Excel Programming 1 October 15th 03 02:41 PM


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

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

About Us

"It's about Microsoft Excel"