Commentaires : se retrouver dedans tout de suite

herve80

XLDnaute Occasionnel
Bonjour, pourriez-vous m'aider svp ?

Comment ajouter un commentaire et se retrouver directement dedans, sans devoir passer par "Modifier le commentaire" ?

Ma macro :

Sub points()
Dim cell As Range
For Each cell In Selection
Selection.Font.Bold = True
Selection.Font.ColorIndex = 3
cell.AddComment
cell.Comment.Visible = False
Cell.Comment.Text Text:=""VIDE CHARGE"
End Sub
 

BOISGONTIER

XLDnaute Barbatruc
Repose en paix
Re : Commentaires : se retrouver dedans tout de suite

Bonjour,

Ajout commentaire sur double-clic

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.Font.Size = 7
Target.Comment.Shape.OLEFormat.Object.Font.FontStyle = "Normal"
Target.Comment.Text Text:="VIDE CHARGE"
SendKeys "+{F2}"
Cancel = True
End If
End Sub

JB
Formation Excel VBA JB
 

Pièces jointes

  • Classeur2.xls
    24.5 KB · Affichages: 71
  • Classeur2.xls
    24.5 KB · Affichages: 71
  • Classeur2.xls
    24.5 KB · Affichages: 78

Discussions similaires

Réponses
0
Affichages
175

Statistiques des forums

Discussions
312 438
Messages
2 088 425
Membres
103 849
dernier inscrit
giem