Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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;
}
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Cause of SheetChange Event Matthew Wieder[_3_] Excel Programming 6 April 25th 07 10:16 PM
SheetChange event restore old value Anton Sommer Excel Programming 1 August 8th 05 10:36 PM
How to know what caused SheetChange event.. Srini Excel Programming 0 April 26th 05 11:22 PM
SheetChange Event Tom Ogilvy Excel Programming 0 November 23rd 04 07:10 PM
SheetChange Event crispbd[_34_] Excel Programming 0 November 23rd 04 06:43 PM


All times are GMT +1. The time now is 12:19 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"