Private Sub Workbook_SheetBeforeRightClick(ByVal Sh As Object, ByVal Target As Range, Cancel As Boolean)
Application.CommandBars("Cell").Reset
Dim Compteur%
With Application.CommandBars("Cell")
With .Controls.Add(msoControlPopup, , , 1, True)
.Caption = "Aller à l'onglet ..."
For Compteur = ThisWorkbook.Sheets.Count To 1 Step -1
If ThisWorkbook.Sheets(Compteur).Visible And Not ThisWorkbook.Sheets(Compteur).Name = Sh.Name Then
With .Controls.Add(Type:=msoControlButton, Before:=1)
.Caption = ThisWorkbook.Sheets(Compteur).Name
.FaceId = 350
.OnAction = ThisWorkbook.Name & "!'Thisworkbook.Select_Feuille " & Chr(34) & .Caption & Chr(34) & "'"
End With
End If
Next Compteur
End With
.Controls(2).BeginGroup = True
End With
End Sub
Private Sub Select_Feuille(Nom_Feuille$)
Sheets(Nom_Feuille).Select
End Sub
Private Sub Workbook_Deactivate()
Application.CommandBars("Cell").Reset
End Sub