Private Sub Worksheet_BeforeRightClick(ByVal Target As Range, Cancel As Boolean)
Dim Control
If Not Intersect(Target, [Tab_Accueil[#headers]].Columns("D:F")) Is Nothing Then
Cancel = True 'empêche l'affichage du menu d'Excel
With Application.CommandBars("Cell")
With .Controls.Add(msoControlButton, 1, , 1, True)
.Caption = "Facture ProForma pour " & Target.Cells(1)
.FaceId = 139
.OnAction = "'CopyTof """ & Target.Cells(1) & """'"
.BeginGroup = True
End With
.ShowPopup
For Each Control In .Controls
If Not Control.BuiltIn Then Control.Delete
Next
End With
End If
End Sub