Many people seem to attempt this, but to me your code should check if Excel
is in a suitable state to respond before you attempt to write to a cell,
i.e. check if Excel is in Edit Mode.
There was a suggestion from MS that you can check the Application.Ready
property.
However, it is not available on XL2000 and below. Also, some reply that it
does not really work.
Another suggestion was to see if the FileNew menu was enabled or not.
It is a very bad idea to force the user out of Edit Mode, as they may have
spent a long time entering a complex formula, only to lose everything
because you want to put a value in a cell.
NickHK
"timo" wrote in message
...
I'm developing software which transfers data from serialport to Excel
sheet.
The problem is software crashing while cursor is in cell and data is
written
to cell. In this project user MUST be able to modify/write cells
sometimes.
This is what I'm gettin: Call was rejected by callee exception from
HRESULT
0x8001001(rpc_e_call_rejected).
Is it possible to switch off cell editing mode while cursor is in cell ?
I'm
talking about similar effect with pressing enter while cursor is in cell.
I'm using VB 2005 & Excel 2003.