E
EBenson
have an Excel COM (C#) add-in. I implemented a ConnectionPoint to sync the
Workbook objects:
////////////////////
[ComVisible(true)]
[InterfaceType(ComInterfaceType.InterfaceIsIDispatch),
GuidAttribute("00024412-0000-0000-C000-000000000046")]
public interface DExcelWorkbookEvents
{[DispId(0x00000616)]void SheetSelectionChange(object Sh, object Target);
// [DispId(0x00000130)]void Activate(); // THIS IS A COMMENT. NOT
IMPLEMENTED
}
///////////////////////////
If I create a workbook and add the VBA macro to sink the
SheetSelectionChange and Activate events, VBA will not receive the Activate
event. So I have to implement all Workbook events in my C# Addin to allow
VBA to get these events?
using Excel 2003 and Visual Studio 2003
Workbook objects:
////////////////////
[ComVisible(true)]
[InterfaceType(ComInterfaceType.InterfaceIsIDispatch),
GuidAttribute("00024412-0000-0000-C000-000000000046")]
public interface DExcelWorkbookEvents
{[DispId(0x00000616)]void SheetSelectionChange(object Sh, object Target);
// [DispId(0x00000130)]void Activate(); // THIS IS A COMMENT. NOT
IMPLEMENTED
}
///////////////////////////
If I create a workbook and add the VBA macro to sink the
SheetSelectionChange and Activate events, VBA will not receive the Activate
event. So I have to implement all Workbook events in my C# Addin to allow
VBA to get these events?
using Excel 2003 and Visual Studio 2003