Quel est le code pour ajouter un commentaire actif après clic droit ?

anthoYS

XLDnaute Barbatruc
Bonjour,

je sais après double clic, mais clic droit, c'est BeforeRightClick ?

VB:
Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean)
With Target
    If .Column = 3 Then
        Cancel = True
        If .Comment Is Nothing Then
            .AddComment
            .Comment.Shape.Width = 48
            .Comment.Shape.Height = 12
            .Comment.Shape.TextFrame.Characters.Font.Bold = True
        End If
        SendKeys "%im"
    End If
End With
If Not Application.Intersect(Target, Range("A:A")) Is Nothing And IsEmpty(Target) Then
Calendrier.Show
End If
Cancel = True
End Sub

Merci !
 

Discussions similaires

Réponses
2
Affichages
123

Membres actuellement en ligne

Statistiques des forums

Discussions
312 084
Messages
2 085 194
Membres
102 812
dernier inscrit
abdouami