To be honest, I've no idea, DDE always did suck, precisely for the problems you are having. DDE (from what I remember) waits for acknowledgement before proceeding. When you call Excel, Excel may decide to pop up a warning box or something, so the ack doesn't get sent, and everything hangs. I think DDE has timeouts... It's been over 10 years since I've touched DDE! With COM, you get full control over Excel, so you disable all of that. You set the .Visible, .ScreenUpdating, & .Calc & .Warnings properties of Excel to False. That way Excel doesn't decide to do something that requires human intervention. A good example of this where Excel recalculates a sheet on loading, this counts as editing, so when you try to close it, Excel pops up the 'Save Changes' dialog. Setting the .Saved attribute to True prevents this. Without knowing what the calling application is, it's hard to make a suggestion. If it supports VBA (like MS Word, AutoCad, a bunch of other) then that's fairly simple. Is there any reason to have the data in Excel? What does Excel give you that a plain text (CSV) file doesn't? Tony > -----Original Message----- > From: piclist-bounces@mit.edu [mailto:piclist-bounces@mit.edu]On Behalf > Of John Pearson > Sent: Sunday, 24 July 2005 1:37 AM > To: pic microcontroller discussion list > Subject: [OT] Excel DDE question... > > > Tony, I hope you read this. > I am opening an Excel spread sheet from an application for DDE communication. I am also opening another spread sheet > within Excel from that application, so I have two spread sheets open at once for DDE communication. > > I am having a problem closing the second spread sheet from my application. When the application closes sheet 2, the > cursor ends up in cell A2 of sheet 1, the Excel title bar is blinking, and sheet 1 will not accept any DDE data until I > move the cursor to another cell or hit the return key. > > Any code I put in my application after closing sheet 2 is not executed until after I move the cursor on sheet 1. > > Is there anything I can do to make the closing of sheet 2 and the reactivation of sheet 1 seamless? > > Thanks > > John > -- > http://www.piclist.com PIC/SX FAQ & list archive > View/change your membership options at > http://mailman.mit.edu/mailman/listinfo/piclist -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist