A
Allan Till
I have created a vb6 COM add in for use with Excel.
I want to add a number of buttons to the menu at runtime depending
on the contents of a folder on the users hard disk.
How can I capture the events from these buttons in the COM add-in given
that I cannot declare instances of the button object withevents at
design time, like this:
Private WithEvents Button1 as Office.ComandBarButton
Private WithEvents Button2 as Office.ComandBarButton
because I only know at runtime how many buttons to add.
I know how to dynamically add buttons but the problem is how to pick up
their events. Can onAction be used to call back to the COM Add-in?
I want to add a number of buttons to the menu at runtime depending
on the contents of a folder on the users hard disk.
How can I capture the events from these buttons in the COM add-in given
that I cannot declare instances of the button object withevents at
design time, like this:
Private WithEvents Button1 as Office.ComandBarButton
Private WithEvents Button2 as Office.ComandBarButton
because I only know at runtime how many buttons to add.
I know how to dynamically add buttons but the problem is how to pick up
their events. Can onAction be used to call back to the COM Add-in?