Cornerback
New Member
- Joined
- Mar 20, 2013
- Messages
- 4
Hi everyone,
I'm looking for a solution for the following problem. Any help would be appreciated <3
I have two Add-Ins, which both create an entry in a custom-menu on startup:
No 1:
No 2:
Now the following is to be done:
In my current version, each Add-In created it's own "Auswertung"-custom-menu, but I did not yet manage to merge both menus. Any ideas?
Kind regards,
Thorben
I'm looking for a solution for the following problem. Any help would be appreciated <3
I have two Add-Ins, which both create an entry in a custom-menu on startup:
No 1:
Code:
Set MenuObject = Application.CommandBars(1). _
Controls.Add(Type:=msoControlPopup, _
Before:=10, _
Temporary:=True)
MenuObject.Caption = "Auswertung"
Set MenuItem2 = MenuObject.Controls.Add(Type:=msoControlPopup)
MenuItem2.Caption = "MCM"
MenuItem2.BeginGroup = True
Set SubMenuItem2 = MenuItem2.Controls.Add(Type:=msoControlButton)
SubMenuItem2.Caption = "Auswerten"
SubMenuItem2.FaceId = 48
SubMenuItem2.OnAction = "AuswahlForm"
No 2:
Code:
Set MenuObject = Application.CommandBars(1). _
Controls.Add(Type:=msoControlPopup, _
Before:=10, _
Temporary:=True)
MenuObject.Caption = "Auswertung"
Set MenuItem1 = MenuObject.Controls.Add(Type:=msoControlPopup)
MenuItem1.Caption = "EvoCS"
Set SubMenuItem1 = MenuItem1.Controls.Add(Type:=msoControlButton)
SubMenuItem1.Caption = "SA-Admin"
SubMenuItem1.FaceId = 53
SubMenuItem1.OnAction = "DummyMacro"
Now the following is to be done:
- If both Add-Ins are installed, both MenuObject.Controls ("EvoCS" and "MCM") have to be sub-menus of "Auswertung"
- If one Add-In is uninstalled, the MenuObject of the Add-In is removed, while the other one isnt changed.
- If both are uninstalled, the custom-menu "Auswertung" should also be removed
In my current version, each Add-In created it's own "Auswertung"-custom-menu, but I did not yet manage to merge both menus. Any ideas?
Kind regards,
Thorben