----- Original Message -----
From: "Mark Howard" <[EMAIL PROTECTED]>
To: "Multiple recipients of list delphi" <[EMAIL PROTECTED]>
Sent: Tuesday, October 21, 2003 4:29 PM
Subject: Re: [DUG]: D5 > D7 ExcelServer


> OK - to answer my own question (in case there is anyone else in the world
who
> didn't already know this)
>
> Change
> RangeE: Excel97(or Excel2000).Range
> to
> RangeE: OleVariant
>
> No idea why - but it works.

It works by deferring the syntax checking from compile-time to run-time,
basically. The Delphi compiler is now happy because it no longer has any
interest in the internals of that variable. It will allow you to refer to
any methods and properties you like, and can no longer tell whether the
object is supposed to have them or not. So now, if you refer to
RangeE.NonExistentProperty the compiler will accept it and the error won't
come until it tries to execute that line. There's probably a performance
hit, too, but unless you're doing a lot of manipulation of the Excel objects
it's probably unnoticeable.

Regards,
Brian

---------------------------------------------------------------------------
    New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
                  Website: http://www.delphi.org.nz
To UnSub, send email to: [EMAIL PROTECTED] 
with body of "unsubscribe delphi"
Web Archive at: http://www.mail-archive.com/delphi%40delphi.org.nz/

Reply via email to