Office commandbar with multi level popup menu and lots of commandbarbutton

M

minimaster

My problem: For an Office addin I'm constructing a commandbar via
VB.net code.
The commandbar has nothing else then popupmenus three levels deep.
the First level: 1 popup named "Macros"
2nd level: multiple popup menus, one for each VBA project found in the
target office application
3rd Level: multiple popup menus, one for each code module foun in the
specific VBA project
in this last popup menu I have commandbar buttons with names of all
the subroutines and functions that are contained in the specifc code
module.
The construction of the menu tree with the popups and all the
commandbar buttons at the end works fine.
my problem now: at the end I'm assigning one and the same click event
handler to all these commandbar buttons.
e.g.: AddHandler ButtonA.click, AddressOf ButtonAwEvents_Click
Now the strange thing that gives me a headache: Only all the buttons
in the last VBA project (as listed in the 2nd level) do work. The
buttons in the other popups (VBA projects) added before do not react
to the click event, even they have all been assigned an event
handler.
Anyone an idea what causes this problem? Anyone an idea for a work
around?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top