--- In [email protected], "entropyreduction" <alancampbelllists+ya...@...> wrote: > > --- In [email protected], "Sheri" <sherip99@> wrote: > > I'm getting oddest behaviour with stuff like > > local objSheet = appRef.ActiveWorkbook.Worksheets(1) > > before a new worksheet is added. > > I'm getting IDispatch::Invoke calls that > > -- return HRESULT 0 (not failure) > > -- for which QueryInterface(IID_ISupportErrorInfo, etc > indicates support for ErrorInfo > > -- but then don't return a valid ErrorInfo* (not too surprising > with HRESULT 0) > > -- but produce a result VARIANT with vt == VT_DISPATCH > but a NULL pdispval. Very odd. > > comPlugin0.72_100111.zip version dances around all that. > > Getting better error messages...well, I've done the > QueryInterface(IID_ISupportErrorInfo/ErrorInfo, but that only > applies just after an Invoke has vbeen done on an IDispatch.
In your comPluginDemoExcelSheri I commented out: if (appRef.Workbooks.Count < 1) appRef.Workbooks.Add and added local mysheet=appRef.ActiveSheet Got ERRORS: com.method: Invoke failed Object can't be found How ever you're doing it, it is nice that Powerpro no longer crashes :) With the compound statement appRef.ActiveSheet.Name = "TestSheet" same error, but if I click Cancel, Powerpro doesn't immediately quit but continues with one more error: Expression before = does not yield valid handle for use with . Probably normal when in its in the midst of a dot sequence. Regards, Sheri
