This error is Excel error “VBA_E_IGNORE”. It is sometimes raised when calling back into Excel via the Excel COM API, often when using the win32compackage.
It’s caused by Excel getting a request to do something when it’s trying to do something else. For example, if you have some code that is updating a range of cells but the user interacts with the workbook, Excel will prioritise the user interaction and throw this error when one of its API methods is called.
To avoid this you should only use the COM API to call back into Excel from the main thread, and when Excel is expecting it.
It is safe to call the COM API from:
- Functions invoked as an Excel macro (see
- Functions called via
- Some Excel COM methods may be called from worksheet functions (UDFs) with macro=True passed to
xl_func, but any that cause the sheet to be updated will fail.
Wrapping your calls to the Excel API in a function and using
async_call is often the safest thing to do.