View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Thomas Ramel Thomas Ramel is offline
external usenet poster
 
Posts: 70
Default 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)