| View previous topic :: View next topic |
| Author |
Message |
Guest
|
Posted: Wed May 16, 2007 12:54 am Post subject: Automation error handling with Delphi 5 and Excel 97+ |
|
|
Hello,
I created a Delphi 5 application that sends data to an Excel 97 or
later worksheet. I used the nice tips on this site:
http://www.djpate.freeserve.co.uk/Automation.htm
Everything works as expected.
If data is being written to the worksheet and a unrelated cell is
accessed manually in the same worksheet Excel gives a "call rejected
by callee" error. I would expect for this to happen since that would
require for Excel to process two commands at the same time.
What I would like to know is if there is a way to prevent the
worksheet to be edited manually while data is being sent to it. Or is
there another way of avoiding this error more elegantly than just
telling the user to not touch the worksheet while it is being filled.
thanks for your attention,
FlyerX |
|
| Back to top |
|
 |
Oliver Townshend Guest
|
Posted: Wed May 16, 2007 3:08 am Post subject: Re: Automation error handling with Delphi 5 and Excel 97+ |
|
|
| Quote: | What I would like to know is if there is a way to prevent the
worksheet to be edited manually while data is being sent to it. Or is
there another way of avoiding this error more elegantly than just
telling the user to not touch the worksheet while it is being filled.
|
Make it non-visible?
Oliver Townshend |
|
| Back to top |
|
 |
Guest
|
Posted: Wed May 16, 2007 11:38 pm Post subject: Re: Automation error handling with Delphi 5 and Excel 97+ |
|
|
On May 15, 5:08 pm, "Oliver Townshend" <oliveratcodelegaldotcomdotau>
wrote:
| Quote: | What I would like to know is if there is a way to prevent the
worksheet to be edited manually while data is being sent to it. Or is
there another way of avoiding thiserrormore elegantly than just
telling the user to not touch the worksheet while it is being filled.
Make it non-visible?
Oliver Townshend
|
Thanks for the suggestion but Excel should be visible for the user to
know that the worksheet is being filled. Besides the worksheet being
access may be opened before my program runs. It would be rather
shocking to a user to see his worksheet suddenly disappear from the
desktop.
FlyerX |
|
| Back to top |
|
 |
|