C
Chris Williamson
Hi,
I am currently developing an ActiveX control in C++ using ATL. It
generates five events, four of which work fine, but the fifth is
causing problems in Excel. It is a very simple event:
Here is the IDL. It is declared as part of a dispatch interface:
[id(5), helpstring("method OnRemoteDisconnect")] HRESULT
OnRemoteDisconnect();
If I add my ActiveX control to Excel, I can the OnRemoteDisconnect
event in the object browser. However when I enter the visual basic
editor and select the control, I can see all my control's events
except for this one. Any idea why it might be missing?
Personally I can only think of 2 possible explanations. Either
(a) The syntax of the event is somehow not compatible with Excel.
Which is odd since it shows up in the object browser.
or
(b) Excel has somehow cached information from an earlier version of my
control where this event wasn't present. The object browser is using
up-to-date information but the editor is using old info from the
cache. In which case how do I refresh this cache? Rebooting doesn't do
the trick, and neither does removing references to the control and
then adding them back in again.
Note that the event works correctly if I look at it in VB 6.
I am currently developing an ActiveX control in C++ using ATL. It
generates five events, four of which work fine, but the fifth is
causing problems in Excel. It is a very simple event:
Here is the IDL. It is declared as part of a dispatch interface:
[id(5), helpstring("method OnRemoteDisconnect")] HRESULT
OnRemoteDisconnect();
If I add my ActiveX control to Excel, I can the OnRemoteDisconnect
event in the object browser. However when I enter the visual basic
editor and select the control, I can see all my control's events
except for this one. Any idea why it might be missing?
Personally I can only think of 2 possible explanations. Either
(a) The syntax of the event is somehow not compatible with Excel.
Which is odd since it shows up in the object browser.
or
(b) Excel has somehow cached information from an earlier version of my
control where this event wasn't present. The object browser is using
up-to-date information but the editor is using old info from the
cache. In which case how do I refresh this cache? Rebooting doesn't do
the trick, and neither does removing references to the control and
then adding them back in again.
Note that the event works correctly if I look at it in VB 6.