![]() |
Trapping SheetChange Event in COM add-in
Hi,
I want to trap SheetChange event in my COM add-in. So when I enter a value in a cell, some sort of information appear in the next cell. My code look like the following.(The number "2.0" showed and Excel crashed!) Could anyone help me? My VBA version works perfectly. class ATL_NO_VTABLE CExcelWF : public CComObjectRootEx<CComSingleThreadModel, public CComCoClass<CExcelWF, &CLSID_ExcelWF, public IDispatchImpl<IExcelWF, &IID_IExcelWF, &LIBID_TestAddinLib, /*wMajor =*/ 1, /*wMinor =*/ 0, public IDispatchImpl<_IDTExtensibility2, &__uuidof(_IDTExtensibility2), &LIBID_AddInDesignerObjects, /* wMajor = */ 1, public IDispEventImpl<1, CExcelWF, &__uuidof(Excel::AppEvents), &__uuidof(Excel::__Excel), 1, 5 { private: Excel::_ApplicationPtr m_xl; public: CExcelWF() { m_xl = 0; } |
All times are GMT +1. The time now is 05:22 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com