1

I have a working RTD Excel automation add-in similar to the one described here. Intermittently, while attempting to load a sheet that includes this formula I get the following error:

Microsoft Office Excel is waiting for another application to complete an OLE action.

I have checked and unchecked "Ignore other applications that use Dynamic Data Exchange (DDE)" per some forum discussion (which I can no longer locate). Neither works.

Google yields many hits for this error but no resolutions. There is an ancient knowledge base article here but again no resolution.

What is causing this error? Is there anything that I can do to avoid it?

Thanks!

Community
  • 1
  • 1
Frank
  • 3,029
  • 5
  • 34
  • 43

3 Answers3

3

Try using Application.DisplayAlerts = False to stop the alerts from displaying.

PJ in FL
  • 31
  • 2
  • 1
    this simply disables the warning but does not solve the underlying problem which is that the add-in is blocking Excel from executing. – Frank Nov 28 '12 at 15:21
1

After bringing Excel up in the debugger and hitting break all it appears that my add-in is deadlocking in ConnectData. You win this time Excel.

Frank
  • 3,029
  • 5
  • 34
  • 43
  • Can you please give more insight about this deadlock? I'm having exact issue. I said break all and it worked fine. but not sure how do i fix it –  Dec 16 '11 at 13:56
  • Excel is making a call to your function on it's main UI thread but your function does not return. Bring up Excel in the debugger and figure out where you are in your function. In short, there is a problem with you code. – Frank Dec 16 '11 at 14:42
  • Frank you said intermittently so how did you debug it? I have the exact problem but cannot get excel to error on my development PC. Was your ConnectData code in the startup or somewhere else? Thanks heaps if you find the time to reply. – darbid Mar 31 '14 at 20:02
  • 1
    @darbid to reproduce the error simply add a sleep call on ConnectData. Take a look at what you are doing in ConnectData to make sure that there are no long running synchronous calls. All network calls should be async. I hope that helps! – Frank Apr 02 '14 at 02:05
  • Thanks but when I said "exact" I did not mean really exact. :-) I have the error message and it happens intermittently, but I am not dealing with ConnectData code. – darbid Apr 02 '14 at 06:00
  • @darbid If you are seeing the "Microsoft Office Excel is waiting..." warning then it means that Excel that something (either your add-in or someone else's) is running on Excel's UI thread and is taking too long. – Frank Apr 02 '14 at 17:08
0

A bit late but it may help someone :

I just face the same issue and I find a way to know more about this error message.

After excel crashes/freeze and display this message, you can go to the Windows Event Viewer (Control Panel -> System and Maintenance -> Administrative Tools -> Double-click Event Viewer ) to get more details.

In my case (a VSTO addin) I have got an error raised in the Net Runtime that I wasn't able to catch with the debugger. It was related to a System.AccessViolationException and to a call to a native dll.

So have look to the event viewer !

Malick
  • 6,252
  • 2
  • 46
  • 59