Das hab ich zum Thema gefunden... ich hoffe du verstehst so viel Englisch

)
Frage:
I want to create a custom menu with submenus. I tried using
View|Toobars|Customize, but couldn't get the nested menus. All I could do
was each command as single item on the same menu. Is there a way to do it in
VBA? Thanks.
***********************************************
Antwort:
***********************************************
You will probably need to set a reference to the Office xx Object Library.
Here is some code to get you up and running (for A97):
Sub sCreateMenu()
Dim cBar as CommandBar
Dim cPopup1 as CommandBarPopup, cPopup2 as CommandBarPopup
Dim cButton as CommandBarControl
Set
cBar=CommandBars.Add(Name:="TestMenu",Position:=msoBarTop,MenuBar:=True,
Temporary:=True)
Set cPopup1=cBar.Controls.Add(Type:=msoControlPopup)
With cPopup1
.Caption="Main"
.BeginGroup=True
End With
Set cPopup2=cPopup1.Controls.Add(Type:=msoControlPopup)
With cPopup2
.Caption="Sub-Menu"
End With
Set cButton=cPopup2.Controls.Add(Type:=msoControlButton)
With cButton
.Caption="Press me!!"
.OnAction="=MsgBox(""I was pressed"")"
End With
cBar.Visible=True