Invoke vba code Error occured

Hi All, I tried to invoke vba code in excel application scope and below error occured:

Source: Invoke VBA

Message: Unable to cast COM object of type ‘System.__ComObject’ to interface type ‘Microsoft.Office.Interop.Excel._Workbook’. This operation failed because the QueryInterface call on the COM component for the interface with IID ‘{000208DA-0000-0000-C000-000000000046}’ failed due to the following error: System call failed. (Exception from HRESULT: 0x80010100 (RPC_E_SYS_CALL_FAILED)).

I tried this stituation before and I turned off the visible in excel application scope and the problem is solved.

However, this time I can’t solve it by turn off the visible check box.

the problem is solved after I turnoff the screen updating as follows:

Application.ScreenUpdating = false

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.