E
Excel dweeb
I'm trying to learn now to build a COM Add-In for Excel using VB6. To
get started, I decided to try to compile the example provided by MS KB
article 238228:
http://support.microsoft.com/default.aspx?kbid=238228, specifically
the part entitled, "Building a COM Add-In Using the VB6 Add-in
Designer."
However, there is a problem with the line close to the top that reads,
"Dim WithEvents MyButton As Office.CommandBarButton"
When trying to compile, I get the error "Object does not source
automation events." Now, I understand that I'm defining MyButton as an
object that possesses events, but supposedly I haven't defined any
events for it. I would have thought that the _Click event (defined in
Private Sub MyButton_Click) qualified, but apparently not.
Has anyone else had occasion to work with this code and fix it so that
it will compile? TIA for any help with this.
get started, I decided to try to compile the example provided by MS KB
article 238228:
http://support.microsoft.com/default.aspx?kbid=238228, specifically
the part entitled, "Building a COM Add-In Using the VB6 Add-in
Designer."
However, there is a problem with the line close to the top that reads,
"Dim WithEvents MyButton As Office.CommandBarButton"
When trying to compile, I get the error "Object does not source
automation events." Now, I understand that I'm defining MyButton as an
object that possesses events, but supposedly I haven't defined any
events for it. I would have thought that the _Click event (defined in
Private Sub MyButton_Click) qualified, but apparently not.
Has anyone else had occasion to work with this code and fix it so that
it will compile? TIA for any help with this.