Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 25
Default 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   Report Post  
Posted to microsoft.public.excel.programming
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)
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,302
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 25
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 25
Default 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
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
Conditional Formatting Published to Former Versions AllieKoch Excel Discussion (Misc queries) 0 December 18th 07 07:33 PM
Compiling VBA as .exe to run within Excel chatterbox Excel Programming 1 November 21st 05 06:20 PM
Please include fonts from previous versions ('98) in new versions JJBQ Excel Discussion (Misc queries) 3 October 8th 05 07:19 PM
compiling an Excel spreadsheet Alex5 Excel Discussion (Misc queries) 3 September 7th 05 04:40 PM
Compiling an Excel Spreadsheet Anthony Felder Excel Programming 2 August 5th 04 10:14 AM


All times are GMT +1. The time now is 03:55 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"