anthoYS
XLDnaute Barbatruc
Bonjour
Code VB de la feuille :
merci !
Code VB de la feuille :
VB:
Private Sub Worksheet_BeforeRightClick(ByVal Target As Range, Cancel As Boolean)
If Target.Column = 6 Then ' Vérifie si le clic droit est dans la colonne F
Cancel = True ' Annule le menu contextuel par défaut
'Masque les commentaires
Application.DisplayCommentIndicator = xlCommentIndicatorOnly
' Crée ou ouvre une nouvelle note
If Target.Comment Is Nothing Then
Range("F2").Copy
With Target
.PasteSpecial Paste:=xlPasteComments
.Comment.Visible = True
.Comment.Shape.Select
End With
End If
End If
End Sub
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
'Masque les commentaires
Application.DisplayCommentIndicator = xlCommentIndicatorOnly
End Sub
merci !