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

This probably is a horrible way to approach the problem, from a style point
of view, but would sending the Excel application either an ESC (would clear
edit and other user-interaction modes) or ENTER (would accept user input or
execute a paste operation, etc.) keystroke via the Win32 API work for you?
The latter might carry risks that are unacceptable, the user getting things
copied over existing cells, for example.


"Goofball" wrote in message
ups.com...
Exit from Excel edit mode using IDispatch

I've searched Internet and groups, but can't find a solution to this.
Can anyone, please, tell, is there any way to perform exit from Excel
edit mode in programmatic way with either accepting user input or
cancelling it. I need to do that from another application using the
IDispatch pointer to Excel. Here is another trick comes out: I can get
the pointer to the active instance of Excel. I can even determine if
is it in edit mode (just call the function to activate my ole object
of excel and I get the E_OUTOFMEMORY error. That is understandable).
So when I detect, that excel is in Edit mode, is there any way to tell
excel to exit that mode? Any ideas? Thanks for any help.