P
PF
Hi all,
I build a menu with
Set newmenu = mymenubar.Controls.Add(TYPE:=msoControlPopup,
Temporary:=True)
newmenu.Caption = "MY Écrans"
Set CTRL(1) = newmenu.CommandBar.Controls.Add(TYPE:=msoControlButton,
id:=1)
With CTRL(1)
.Caption = "Controle"
.TooltipText = ""
.Style = msoButtonCaption
.OnAction = "=f1()"
End With
... + 5 others
Set newmenu = mymenubar.Controls.Add(TYPE:=msoControlPopup,
Temporary:=True)
newmenu.Caption = "MY Rpt"
Set CTRL(1) = newmenu.CommandBar.Controls.Add(TYPE:=msoControlButton,
id:=1)
With CTRL(1)
.Caption = "Report 1"
.TooltipText = ""
.Style = msoButtonCaption
.OnAction = "=f2()"
End With
... + 6 others
When i have more than 7 items on the second menu i have an automation error
Note CTRL is an array of 10 object
Is there a limitation on the length of the menu?
Does someone know how to put a separator in the menu list.
best regards
pierre
I build a menu with
Set newmenu = mymenubar.Controls.Add(TYPE:=msoControlPopup,
Temporary:=True)
newmenu.Caption = "MY Écrans"
Set CTRL(1) = newmenu.CommandBar.Controls.Add(TYPE:=msoControlButton,
id:=1)
With CTRL(1)
.Caption = "Controle"
.TooltipText = ""
.Style = msoButtonCaption
.OnAction = "=f1()"
End With
... + 5 others
Set newmenu = mymenubar.Controls.Add(TYPE:=msoControlPopup,
Temporary:=True)
newmenu.Caption = "MY Rpt"
Set CTRL(1) = newmenu.CommandBar.Controls.Add(TYPE:=msoControlButton,
id:=1)
With CTRL(1)
.Caption = "Report 1"
.TooltipText = ""
.Style = msoButtonCaption
.OnAction = "=f2()"
End With
... + 6 others
When i have more than 7 items on the second menu i have an automation error
Note CTRL is an array of 10 object
Is there a limitation on the length of the menu?
Does someone know how to put a separator in the menu list.
best regards
pierre