Condition calls

  • Thread starter Thread starter Phil Barber
  • Start date Start date
P

Phil Barber

i have app that uses excel, some of the clients use office 2000 and the
others user office 2003.
the call
AWorkbook = ExcelObj.Workbooks.Open()

in office 2003 takes 15 arguments and office 2000 the call takes 13
arguments.

how can I code the source to allow for both. I plan to use a XML file to
read in the version on the workstation.

thanks

Phil barb
 
well, you have to write 2 methods, each taking a different number of
parameters. And when calling, depending on the number and order of
parameters, the correct one will be called.
 
Rami, I have the same problem. I upgraded my dev machine to Office 2003 and now the project that uses Office fails to compile [No overload for method 'Open' takes '13' arguments] and [Propety, indexer, or event 'Value' is not supported by the language...]. I can correct those compile errors easily enough but then will the project run on only machines with Office 2003 (very few of my users)? Is there a way to continue to build product for Office 2000 users without un-installing Office 2003 from my dev machine?
 
Back
Top