Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Conditional compiling between Excel Versions
The program that I am writing using Excel 2003 is spread over many modules
and is not totally compatible with Excel 2000. I get compiler errors in many modules. My question is: how is this normally handled? I can use the compiler constants #Const and its associated #IF statement to conditionally compile certain pieces of code, but the Constant has to be defined in EVERY module that you're going to use it in and then has to be manually changed when you get the code over to the destination machine(Excel Version). It all seems pretty cumbersome to me. Am I missing something here?? Other than a few brain cells!!! thanks, ken |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Conditional compiling between Excel Versions
Grüezi Ken
Ken Soenen schrieb am 03.03.2006 The program that I am writing using Excel 2003 is spread over many modules and is not totally compatible with Excel 2000. I get compiler errors in many modules. My question is: how is this normally handled? I can use the compiler constants #Const and its associated #IF statement to conditionally compile certain pieces of code, but the Constant has to be defined in EVERY module that you're going to use it in and then has to be manually changed when you get the code over to the destination machine(Excel Version). It all seems pretty cumbersome to me. Am I missing something here?? Other than a few brain cells!!! You could use 'Applicaion.Version' to find out which verion of Excel is running. In an If-statemend you have the diffenrent code for each version. Regards Thomas Ramel -- - MVP for Microsoft-Excel - [Win XP Pro SP-2 / xl2000 SP-3] Microsoft Excel - Die ExpertenTipps: (http://tinyurl.com/9ov3l und http://tinyurl.com/cmned) |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Conditional compiling between Excel Versions
Hi Ken,
The conventional advice would be to develop the application in the lowest version which, it is anticipated, it will be used. This does not preclude the possible use of conditional compilation to provide additional functionality to users of later versions. --- Regards, Norman "Ken Soenen" wrote in message ... The program that I am writing using Excel 2003 is spread over many modules and is not totally compatible with Excel 2000. I get compiler errors in many modules. My question is: how is this normally handled? I can use the compiler constants #Const and its associated #IF statement to conditionally compile certain pieces of code, but the Constant has to be defined in EVERY module that you're going to use it in and then has to be manually changed when you get the code over to the destination machine(Excel Version). It all seems pretty cumbersome to me. Am I missing something here?? Other than a few brain cells!!! thanks, ken |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Conditional compiling between Excel Versions
It doesn't have to be defined in every module, you can add a global
conditional constant in the project properties, General tab. -- HTH Bob Phillips (remove nothere from email address if mailing direct) "Ken Soenen" wrote in message ... The program that I am writing using Excel 2003 is spread over many modules and is not totally compatible with Excel 2000. I get compiler errors in many modules. My question is: how is this normally handled? I can use the compiler constants #Const and its associated #IF statement to conditionally compile certain pieces of code, but the Constant has to be defined in EVERY module that you're going to use it in and then has to be manually changed when you get the code over to the destination machine(Excel Version). It all seems pretty cumbersome to me. Am I missing something here?? Other than a few brain cells!!! thanks, ken |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
Conditional compiling between Excel Versions
Bob,
Thanks for responding. Can you expand a bit on how to find the "General tab". The only thing I can find is "General" under the options... Also, couldn't see anything in the project properties window. thanks, ken "Bob Phillips" wrote in message ... It doesn't have to be defined in every module, you can add a global conditional constant in the project properties, General tab. -- HTH Bob Phillips (remove nothere from email address if mailing direct) "Ken Soenen" wrote in message ... The program that I am writing using Excel 2003 is spread over many modules and is not totally compatible with Excel 2000. I get compiler errors in many modules. My question is: how is this normally handled? I can use the compiler constants #Const and its associated #IF statement to conditionally compile certain pieces of code, but the Constant has to be defined in EVERY module that you're going to use it in and then has to be manually changed when you get the code over to the destination machine(Excel Version). It all seems pretty cumbersome to me. Am I missing something here?? Other than a few brain cells!!! thanks, ken |
#6
Posted to microsoft.public.excel.programming
|
|||
|
|||
Conditional compiling between Excel Versions
Select the project in the project explorer within the VBIDE, and then
ToolsVBAProject Properties (assuming that you haven't renamed your project), and on the General tab, at the bottom is a box labelled Conditional Compilation Arguments. Add a conditional variable and value in there. -- HTH Bob Phillips (remove nothere from email address if mailing direct) "Ken Soenen" wrote in message ... Bob, Thanks for responding. Can you expand a bit on how to find the "General tab". The only thing I can find is "General" under the options... Also, couldn't see anything in the project properties window. thanks, ken "Bob Phillips" wrote in message ... It doesn't have to be defined in every module, you can add a global conditional constant in the project properties, General tab. -- HTH Bob Phillips (remove nothere from email address if mailing direct) "Ken Soenen" wrote in message ... The program that I am writing using Excel 2003 is spread over many modules and is not totally compatible with Excel 2000. I get compiler errors in many modules. My question is: how is this normally handled? I can use the compiler constants #Const and its associated #IF statement to conditionally compile certain pieces of code, but the Constant has to be defined in EVERY module that you're going to use it in and then has to be manually changed when you get the code over to the destination machine(Excel Version). It all seems pretty cumbersome to me. Am I missing something here?? Other than a few brain cells!!! thanks, ken |
#7
Posted to microsoft.public.excel.programming
|
|||
|
|||
Conditional compiling between Excel Versions
General is it. Does it have a textbox at the bottom named Conditional
Compilation Arguments Note: "General" appears on one of the two "tabs" -- Regards, Tom Ogilvy "Ken Soenen" wrote in message ... Bob, Thanks for responding. Can you expand a bit on how to find the "General tab". The only thing I can find is "General" under the options... Also, couldn't see anything in the project properties window. thanks, ken "Bob Phillips" wrote in message ... It doesn't have to be defined in every module, you can add a global conditional constant in the project properties, General tab. -- HTH Bob Phillips (remove nothere from email address if mailing direct) "Ken Soenen" wrote in message ... The program that I am writing using Excel 2003 is spread over many modules and is not totally compatible with Excel 2000. I get compiler errors in many modules. My question is: how is this normally handled? I can use the compiler constants #Const and its associated #IF statement to conditionally compile certain pieces of code, but the Constant has to be defined in EVERY module that you're going to use it in and then has to be manually changed when you get the code over to the destination machine(Excel Version). It all seems pretty cumbersome to me. Am I missing something here?? Other than a few brain cells!!! thanks, ken |
#8
Posted to microsoft.public.excel.programming
|
|||
|
|||
Conditional compiling between Excel Versions
That does it. Thanks a bunch guys.
ken "Bob Phillips" wrote in message ... Select the project in the project explorer within the VBIDE, and then ToolsVBAProject Properties (assuming that you haven't renamed your project), and on the General tab, at the bottom is a box labelled Conditional Compilation Arguments. Add a conditional variable and value in there. -- HTH Bob Phillips (remove nothere from email address if mailing direct) "Ken Soenen" wrote in message ... Bob, Thanks for responding. Can you expand a bit on how to find the "General tab". The only thing I can find is "General" under the options... Also, couldn't see anything in the project properties window. thanks, ken "Bob Phillips" wrote in message ... It doesn't have to be defined in every module, you can add a global conditional constant in the project properties, General tab. -- HTH Bob Phillips (remove nothere from email address if mailing direct) "Ken Soenen" wrote in message ... The program that I am writing using Excel 2003 is spread over many modules and is not totally compatible with Excel 2000. I get compiler errors in many modules. My question is: how is this normally handled? I can use the compiler constants #Const and its associated #IF statement to conditionally compile certain pieces of code, but the Constant has to be defined in EVERY module that you're going to use it in and then has to be manually changed when you get the code over to the destination machine(Excel Version). It all seems pretty cumbersome to me. Am I missing something here?? Other than a few brain cells!!! thanks, ken |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Conditional Formatting Published to Former Versions | Excel Discussion (Misc queries) | |||
Compiling VBA as .exe to run within Excel | Excel Programming | |||
Please include fonts from previous versions ('98) in new versions | Excel Discussion (Misc queries) | |||
compiling an Excel spreadsheet | Excel Discussion (Misc queries) | |||
Compiling an Excel Spreadsheet | Excel Programming |