Martin Bernier
Martin Bernier

Reputation: 41

Run-time error '-2147352567 (80020009)'

Anyone had this run-time error in the past? I make use of Excel Link quite extensively with Matlab 2009a. I have a workbook which used to work fine, and now I get this error for every MLGetMatrix call. Note that MLEvalString, MLPutVar and MLGetVar do work as expected. But as soon as a MLGetMatrix is issued, I get this Run-time error, and it is driving me mad as I can't seem to find why! Please, if you met this in the past, could you tell me what is causing it?! Thank you.

Martin

Upvotes: 1

Views: 2182

Answers (2)

Martin Bernier
Martin Bernier

Reputation: 41

Figured it out. I was using the variable name isempty in one of my MATLAB evaluations prior to calling MLGetMatrix (which as we know is also a built-in function). This seems to be the cause of the problem. Changing that variable name to something else solved the problem. The executed code seemed to be running of modifying the Matlab environment, but nevertheless blocked any further attempt at using MLGetMatrix...

Upvotes: 2

Jason S
Jason S

Reputation: 189696

That 80020009 hex value smells like a COM/ActiveX HRESULT. Some googling yields DISP_E_EXCEPTION = 0x80020009, which doesn't really help other than the fact that it means something has caused a DISP_E_EXCEPTION (which I think is an exception in a COM IDispatch::Invoke() call).

edit: since Excel Link is a Mathworks product maybe you should put in a bug report to them?

Upvotes: 0

Related Questions