Vous êtes sur la page 1sur 2

Ceci est un commentaire

Crée une bare d'outils de création de commentaire sa


user
Sub auto_open()
Dim barre As CommandBar
Dim bouton As CommandBarControl
On Error Resume Next
Application.CommandBars("BarreCommentaires").Delete
On Error GoTo 0
Set barre = CommandBars.Add(Name:="BarreCommentaires")
barre.Visible = True
Set bouton = CommandBars("BarreCommentaires").Controls.Add(Type:=msoCon
bouton.Style = msoButtonCaption
bouton.OnAction = "Commentaire"
bouton.Caption = "Insère commentaire"
End Sub

Sub Commentaire()
If ActiveCell.Comment Is Nothing Then
ActiveCell.AddComment ' Création commentaire
ActiveCell.Comment.Shape.OLEFormat.Object.Font.Name = "Tverdana"
ActiveCell.Comment.Shape.OLEFormat.Object.Font.Size = 7
ActiveCell.Comment.Shape.OLEFormat.Object.Font.FontStyle = "Normal"
SendKeys "+{F2}"
End If
End Sub
ion de commentaire sans nom de

es").Delete

eCommentaires")

aires").Controls.Add(Type:=msoControlButton)

aire
ct.Font.Name = "Tverdana"
ct.Font.Size = 7
ct.Font.FontStyle = "Normal"

Vous aimerez peut-être aussi