bonsoir
j'aimerai créer un menu, et dans ce menu un sous menu "imprimer" avec 2 items
j'ai le code ci dessous mais je n'arrive pas à afficher mes 2 items (pop up) dans le sous menu imprimer, comment faire
merci
With CommandBars(1).Controls.Add(msoControlPopup)
.Caption = "Menu Habillement"
With .Controls.Add(msoControlButton)
.Caption = "Inventaire CS"
.FaceId = 1
.BeginGroup = True
.OnAction = "inventaire"
End With
With .Controls.Add(msoControlButton)
.Caption = "Tri par catégorie"
.FaceId = 1
.BeginGroup = True
.OnAction = "tricategorie"
End With
With .Controls.Add(msoControlButton)
.Caption = "Total à commander"
.FaceId = 1
.BeginGroup = True
.OnAction = "total"
End With
With .Controls.Add(msoControlButton)
.Caption = "Liste des agents"
.FaceId = 1
.BeginGroup = True
.OnAction = "listeagents"
End With
With .Controls.Add(msoControlButton)
.Caption = "Créer une fiche agent"
.FaceId = 1
.BeginGroup = True
.OnAction = "creerfiche"
End With
End With
' creer les popup de menu dans imprimer
With Application.CommandBars("menu habillement")
With .Controls.Add(msoControlPopup)
.Caption = "Imprimer"
.BeginGroup = False
' Sous-menu 1 (Imprimer une fiche agent)
.Controls.Add (msoControlButton)
.Controls(1).Caption = "Imprime une fiche agent"
With .Controls(1)
.OnAction = "Imprime"
.FaceId = 351
End With
' Sous-menu 2 (Imprime toutes les fiches)
.Controls.Add (msoControlButton)
.Controls(2).Caption = "Imprime toutes les fiches"
With .Controls(2)
.OnAction = "imprime"
.FaceId = 352
End With
End With
End With
j'aimerai créer un menu, et dans ce menu un sous menu "imprimer" avec 2 items
j'ai le code ci dessous mais je n'arrive pas à afficher mes 2 items (pop up) dans le sous menu imprimer, comment faire
merci
With CommandBars(1).Controls.Add(msoControlPopup)
.Caption = "Menu Habillement"
With .Controls.Add(msoControlButton)
.Caption = "Inventaire CS"
.FaceId = 1
.BeginGroup = True
.OnAction = "inventaire"
End With
With .Controls.Add(msoControlButton)
.Caption = "Tri par catégorie"
.FaceId = 1
.BeginGroup = True
.OnAction = "tricategorie"
End With
With .Controls.Add(msoControlButton)
.Caption = "Total à commander"
.FaceId = 1
.BeginGroup = True
.OnAction = "total"
End With
With .Controls.Add(msoControlButton)
.Caption = "Liste des agents"
.FaceId = 1
.BeginGroup = True
.OnAction = "listeagents"
End With
With .Controls.Add(msoControlButton)
.Caption = "Créer une fiche agent"
.FaceId = 1
.BeginGroup = True
.OnAction = "creerfiche"
End With
End With
' creer les popup de menu dans imprimer
With Application.CommandBars("menu habillement")
With .Controls.Add(msoControlPopup)
.Caption = "Imprimer"
.BeginGroup = False
' Sous-menu 1 (Imprimer une fiche agent)
.Controls.Add (msoControlButton)
.Controls(1).Caption = "Imprime une fiche agent"
With .Controls(1)
.OnAction = "Imprime"
.FaceId = 351
End With
' Sous-menu 2 (Imprime toutes les fiches)
.Controls.Add (msoControlButton)
.Controls(2).Caption = "Imprime toutes les fiches"
With .Controls(2)
.OnAction = "imprime"
.FaceId = 352
End With
End With
End With