Popup menu problème de manipulation
Bonjour,
Dans cette fonction :
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13
| Sub chose(varTexte As String, Nb As Integer)
' First, add two buttons to the menu.
With Application.CommandBars.Add(Name:=Mname, Position:=msoBarPopup, MenuBar:=False, Temporary:=True)
With .Controls.Add(Type:=msoControlButton)
.Caption = varTexte
.FaceId = 71 + Nb
.OnAction = "'" & ThisWorkbook.Name & "'!" & "TestMacro"
End With
End With
End Sub |
Quand je fais l'appel suivant :
Code:
1 2
|
Call chose("Tous les types", 0) |
ça fonctionne bien
Mais Quand je fais 2 appels ainsi:
Code:
1 2 3
| Call chose("Tous les types", 0)
Call chose("Tous les types", 1) |
le programme ne fonctionne plus, Svp pourquoi cette erreur et merci