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 28
|
Function MonCliqueDroit (ByVal Sh As Object, ByVal Target As Range, Cancel As Boolean)
If Target.ListObject Is Nothing Then
exit function
end if
Call SupprimerControlAjoute ""List Range Popup""
Set ContextMenu = Application.CommandBars("List Range Popup") 'List Range Layout Popup
ContextMenu.Reset
' Add one custom button to the Cell context menu.
With ContextMenu.Controls.Add(Type:=msoControlButton, before:=1)
.OnAction = "'" & ThisWorkbook.Name & "'!" & "zSupprimerLignes"
.FaceId = 293
.Caption = "Supprimer une ou des lignes"
.Tag = "My_Cell_Control_Tag"
End With
With ContextMenu.Controls.Add(Type:=msoControlButton, before:=1)
.OnAction = "'" & ThisWorkbook.Name & "'!" & "zSupprimerLignes"
.FaceId = 296
.Caption = "Insérer une ou des lignes"
.Tag = "My_Cell_Control_Tag"
End With
ContextMenu.Controls(3).BeginGroup = True
end sub |
Partager