Board index » delphi » Excel 97 <-> Excel 2000

Excel 97 <-> Excel 2000

Hi !

One Range-method is declared differently in '97 and '2000 versions of Excel:

'97-version:
    function Replace(
        What: OleVariant;
        Replacement: OleVariant;
        LookAt: OleVariant;
        SearchOrder: OleVariant;
        MatchCase: OleVariant;
        MatchByte: OleVariant;
        MatchControlCharacters: OleVariant;
        MatchDiacritics: OleVariant;
        MatchKashida: OleVariant;
        MatchAlefHamza: OleVariant): WordBool; dispid 226;

'2000-version:
    function Replace(
        What: OleVariant;
        Replacement: OleVariant;
        LookAt: OleVariant;
        SearchOrder: OleVariant;
        MatchCase: OleVariant;
        MatchByte: OleVariant): WordBool; dispid 226;

...the question is, how do I get to use both versions (I know how to find
Excel version)....from the same .EXE ???

Thank you !

--
Bjoerge Saether
Consultant / Developer
Asker, Norway
bsaether.removet...@online.no (remove the obvious)

 

Re:Excel 97 <-> Excel 2000


<<Bjoerge Saether:
One Range-method is declared differently in '97 and '2000
versions of Excel:

Quote

If you don't need to set the parameters, you could just use
the 2000 version - it works with Excel 97. I think this is
another internationalization thing - if you look up the Excel
97 VBA help, you'll see it knows nothing about the extra
parameters.  But the 97 sort method has 3 similar parameters
at the end, which according to the help are not used in US
English Excel versions, and which don't appear in
Excel2000.pas. Does the 2000 help say anything about
international users?

--
Deborah Pate

Re:Excel 97 <-> Excel 2000


"Deborah Pate" <d.p...@cableinet.co.not-this-bit.uk> skrev i melding
news:38df1e84@dnews...

Quote
> <<Bjoerge Saether:
> One Range-method is declared differently in '97 and '2000
> versions of Excel:

> If you don't need to set the parameters, you could just use
> the 2000 version - it works with Excel 97.

I just commented out the last 3 parameters of the Replace method in '97 TLB,
and -voil ! It worked !
Thanks a lot !

Quote
>I think this is
> another internationalization thing - if you look up the Excel
> 97 VBA help, you'll see it knows nothing about the extra
> parameters.

Both my Excel versions are Norwegian, but the extra params are not described
in the Norwegian help file, either.  I just added them to satisfy the
compiler...but now they're gone..;-)

Quote
> But the 97 sort method has 3 similar parameters
> at the end, which according to the help are not used in US
> English Excel versions, and which don't appear in
> Excel2000.pas. Does the 2000 help say anything about
> international users?

No. The enclosed VBA help file is English in '2000, while Norwegian in '97.

--
Bjoerge Saether
Consultant / Developer
Asker, Norway
bsaether.removet...@online.no (remove the obvious)

Re:Excel 97 <-> Excel 2000


bsaether.removet...@online.no (remove the obvious)

"Bj?rge S?ther" <REMOVE_bsaet...@online.no> skrev i melding
news:38e0a024@dnews...

Quote
> "Deborah Pate" <d.p...@cableinet.co.not-this-bit.uk> skrev i melding
> news:38df1e84@dnews...
> > <<Bjoerge Saether:
> > One Range-method is declared differently in '97 and '2000
> > versions of Excel:

> > If you don't need to set the parameters, you could just use
> > the 2000 version - it works with Excel 97.

> I just commented out the last 3 parameters of the Replace method in '97
TLB,
> and -voil ! It worked !

...sorry, 4 last parameters, that should be...
--
Bjoerge Saether
Consultant / Developer
Asker, Norway

Other Threads