Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Is it possible to perform conditional compilation based on Excel version?
For example I have code that needs to continue to support XL97 but I'd like to take advantage of new arguments to an Excel method introduced in XL2000 and later. #If XL97 Then abc xyz #Else abc xyz, lmnop #End If TIA josh |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi Josh,
The Vba version changed from VBA 5 to VBA 6 in Excel 2000. New compiler constants were also created, so... #If VBA5 Then abc xyz #ElseIf VBA6 Then abc xyz, lmnop #End If Unfortunately, there seems to be no way to differentiate between xl2000 and later versions using compiler constants. Regards, Jim Cone San Francisco, USA "Josh Sale" <jsale@tril dot cod wrote in message Is it possible to perform conditional compilation based on Excel version? For example I have code that needs to continue to support XL97 but I'd like to take advantage of new arguments to an Excel method introduced in XL2000 and later. #If XL97 Then abc xyz #Else abc xyz, lmnop #End If TIA josh |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
#If VBA5 Then
There is no VBA5 compiler constant. -- Cordially, Chip Pearson Microsoft MVP - Excel Pearson Software Consulting, LLC www.cpearson.com "Jim Cone" wrote in message ... Hi Josh, The Vba version changed from VBA 5 to VBA 6 in Excel 2000. New compiler constants were also created, so... #If VBA5 Then abc xyz #ElseIf VBA6 Then abc xyz, lmnop #End If Unfortunately, there seems to be no way to differentiate between xl2000 and later versions using compiler constants. Regards, Jim Cone San Francisco, USA "Josh Sale" <jsale@tril dot cod wrote in message Is it possible to perform conditional compilation based on Excel version? For example I have code that needs to continue to support XL97 but I'd like to take advantage of new arguments to an Excel method introduced in XL2000 and later. #If XL97 Then abc xyz #Else abc xyz, lmnop #End If TIA josh |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Chip,
Thanks Chip, you are so right. That code should read... #If VBA6 Then abc xyz, lmnop #Else abc xyz #End If Regards, Jim Cone "Chip Pearson" wrote in message ... #If VBA5 Then There is no VBA5 compiler constant. -- Cordially, Chip Pearson Microsoft MVP - Excel Pearson Software Consulting, LLC www.cpearson.com |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Thanks!
Exactly what I needed!! josh |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Compilation error in Excel 97 | Excel Programming | |||
VBA Excel compilation error | Excel Programming | |||
Conditional Compilation using Application.Version | Excel Programming | |||
Conditional Compilation using Application.Version | Excel Programming | |||
Conditional compilation | Excel Programming |