Regarding SheetCalculate event in Excel API
-
Using Excel object library, I have written an application which capture all events. I have an issue in event called SheetCalculate. SheetCalcuate event returns IDispatch*. From IDispatch* , I am trying to get sheet name or function cell change for which event is triggered. Please guide me if any one worked on this. Thanks in advance.
-
Using Excel object library, I have written an application which capture all events. I have an issue in event called SheetCalculate. SheetCalcuate event returns IDispatch*. From IDispatch* , I am trying to get sheet name or function cell change for which event is triggered. Please guide me if any one worked on this. Thanks in advance.
You can use QueryInterface on the IDispatch interface to get at the desired interface -
IDesiredInterface* pI;
pDispatch->QueryInterface(IID_IDesiredInterface, (LPVOID*)&pI);Or you can use the CComQIPtr smart pointer -
CComQIPtr pI(pDispatch);
«_Superman_» _I love work. It gives me something to do between weekends.