bonjour,
je viens d'inscrire un code dans ThisWorkbook :
mon problème c'est qu'il marche bien quand je clic sur une cellule bateau mais dès que c'est une cellule de tableau ça ne marche plus.
Code : Sélectionner tout - Visualiser dans une fenêtre à part
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
29
30 Option Explicit Private Sub Workbook_Deactivate() On Error Resume Next With Application .CommandBars("Cell").Controls("préparation envoi").Delete End With On Error GoTo 0 End Sub Private Sub Workbook_SheetBeforeRightClick(ByVal Sh As Object, ByVal Target As Range, Cancel As Boolean) Dim cBut As CommandBarButton On Error Resume Next With Application .CommandBars("Cell").Controls("préparation de l'envoi2").Delete Set cBut = .CommandBars("Cell").Controls.Add(Temporary:=True) End With With cBut .Caption = "préparation de l'envoi2" .BeginGroup = True .FaceId = 2933 ' n° de l'icone .Style = msoButtonIconAndCaption .OnAction = "macro" End With On Error GoTo 0 End Sub
comment puis-je faire pour que ça marche tout le temps ?
Partager