Bonsoir à tous ,
j'espere que vous pourrez m'aider, voilà j'ai une macro (ci dessous) qui me permets de mettre un commentaire dans une cellule lorsque je double click sur une cellule .
-est il possible de déclencher la macro par un triple click ou alors de déclencher la macro à l'aide d'un bouton .
Merci d'avance pour votre aide
Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean)
If Target.Comment Is Nothing Then
Target.AddComment ' Création commentaire
Target.Comment.Shape.OLEFormat.Object.Font.Name = "Tverdana"
Target.Comment.Shape.OLEFormat.Object.Width = 300
Target.Comment.Shape.OLEFormat.Object.Height = 100
Target.Comment.Shape.OLEFormat.Object.Font.Size = 16
Target.Comment.Shape.OLEFormat.Object.Font.FontStyle = "Normal"
Target.Comment.Shape.OLEFormat.Object.Interior.ColorIndex = 3 'couleur de fond
Target.Comment.Shape.TextFrame.Characters.Font.ColorIndex = 10 'couleur police
SendKeys "+{F2}"
Cancel = True
End If
End Sub
Bonne soirée
DAVID
j'espere que vous pourrez m'aider, voilà j'ai une macro (ci dessous) qui me permets de mettre un commentaire dans une cellule lorsque je double click sur une cellule .
-est il possible de déclencher la macro par un triple click ou alors de déclencher la macro à l'aide d'un bouton .
Merci d'avance pour votre aide
Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean)
If Target.Comment Is Nothing Then
Target.AddComment ' Création commentaire
Target.Comment.Shape.OLEFormat.Object.Font.Name = "Tverdana"
Target.Comment.Shape.OLEFormat.Object.Width = 300
Target.Comment.Shape.OLEFormat.Object.Height = 100
Target.Comment.Shape.OLEFormat.Object.Font.Size = 16
Target.Comment.Shape.OLEFormat.Object.Font.FontStyle = "Normal"
Target.Comment.Shape.OLEFormat.Object.Interior.ColorIndex = 3 'couleur de fond
Target.Comment.Shape.TextFrame.Characters.Font.ColorIndex = 10 'couleur police
SendKeys "+{F2}"
Cancel = True
End If
End Sub
Bonne soirée
DAVID