AddOleObject() fails if a key is pressed

A

abhimanyu

I am developing an AddIn in C# 2.0 using Visual Studio 2005 for Excel
2002.

The addin adds a number of OLE objects to the form in a loop. The
problem is that if I press any key when the loop is executing, the
AddOLEObject() method fails and throws a COM exception.
I tried disabling Events, Calculation etc but could not get a way to
disable input in the cell. Is there any way I can disable the keyboard
while the loop is being executed.
If I use Interactive = False, ESC key processing is also disabled and
I need it to interrupt the processing.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top