View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Fredrik Wahlgren Fredrik Wahlgren is offline
external usenet poster
 
Posts: 339
Default Bug in Excel? Excel Multithreading ERROR


"JCChin" wrote in message
...
Hi, I am writing an multithreaded Excel Add-in program and an error. I
currently have no clue how to solve this. Please help. The description is

as
below:

I created an Excel Add-in in C#. The add-in contains a separate thread

that
read and write to the worksheet constantly.

I got a COMException when the program is accessing to the cell while I
clicking on the worksheet.

HRESULT of the exception is: 0x800AC472

I could mitigate this problem by having the add-in to retry after this
exception occur. However, Excel will not exit cleanly after exception

occur.
That is, the Excel process still running after my add-in have been shutted
down and Excel window closed. I have to kill the process manually :(

Anyone having the same problem?




I think it's a bad idea to write a multi threaded add-in. My guess is that
Excel is not in the state it should be in when this add-in tries access a
cell while you try to access some other cell. Why does it constantly have to
read and write to the worksheet?

/Fredrik