BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Automation error handling with Delphi 5 and Excel 97+

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi OLE Automation
View previous topic :: View next topic  
Author Message
Guest






PostPosted: Wed May 16, 2007 12:54 am    Post subject: Automation error handling with Delphi 5 and Excel 97+ Reply with quote



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





PostPosted: Wed May 16, 2007 3:08 am    Post subject: Re: Automation error handling with Delphi 5 and Excel 97+ Reply with quote



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






PostPosted: Wed May 16, 2007 11:38 pm    Post subject: Re: Automation error handling with Delphi 5 and Excel 97+ Reply with quote



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
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi OLE Automation All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.