ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   AddOleObject() fails if a key is pressed (https://www.excelbanter.com/excel-programming/399458-addoleobject-fails-if-key-pressed.html)

abhimanyu

AddOleObject() fails if a key is pressed
 
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.



All times are GMT +1. The time now is 02:10 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com