1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27
| Sub ADBAR()
Dim maBarP As CommandBarPopup
Dim maBarP2 As CommandBarPopup
Dim FL As Integer, SL As Integer, Ida As Integer
Ida = 1
Set maBarP = Application.CommandBars("Worksheet Menu Bar").Controls.Add(msoControlPopup, , , , True)
maBarP.TooltipText = "Poules"
maBarP.Caption = "Poules"
For FL = 1 To 4
Set maBarP2 = maBarP.Controls.Add(msoControlPopup, , , , True)
maBarP2.TooltipText = "Poules " & FL
maBarP2.Caption = "Poules " & FL
For SL = 1 To 10
If Ida > 33 Then Exit Sub
With maBarP2.Controls.Add(msoControlButton)
.Caption = "Poules_" & Ida
.OnAction = "'ppoules " & Ida & "'"
.FaceId = 49 '49=?
Ida = Ida + 1
End With
Next SL
Next FL
End Sub |
Partager