View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.misc, microsoft.public.excel.programming,microsoft.public.excel, microsoft.public.excel.sdk
Goofball Goofball is offline
external usenet poster
 
Posts: 13
Default Exit from Excel edit mode using IDispatch

Thanks. That's one more way to find out if edit mode is on. The
question is still open: is there a way to turn it off?...

On Nov 14, 7:21 pm, "Andrei Smolin [Add-in Express]" <andrei dot
smolin @ add-in-express dot_com wrote:
Hello,

Excel provides the Application.Interactive property. Try (and catch) to set
it to false. If the exception fires, you cannot do anything because the edit
mode is on.

Regards from Belarus,

Andrei Smolin
Add-in Express Team Leaderwww.add-in-express.com

"Goofball" wrote in message

ups.com...

Thanks, however the problem is a bit different.


User opens some file and starts editing the cell, thus putting excel
into the edit mode. Then I launch my application that works with excel
ole object. And I can't activate that object, bacause of an error.
I've ivestigated that issue and found out, that this is because excel
is in the edit mode. So, I basically need to tell excel to exit that
mode. If its possible :)


On Nov 13, 10:34 pm, Colby Africa wrote:
It sounds like you need to call the following:


IOleInplaceObject::InPlaceDeactivate()
IOleObject::Close()
IUnknown::Realease()


In order to fully exit and close theExcelprocess. It has been years
since I did anything like that though!


HTH,


Colby