Excel et ajout de commentaires sur une cellule

Zylott Messages postés 104 Date d'inscription jeudi 25 juillet 2002 Statut Membre Dernière intervention 28 septembre 2006 - 28 sept. 2006 à 17:30
cs_wape Messages postés 262 Date d'inscription samedi 21 décembre 2002 Statut Membre Dernière intervention 19 décembre 2010 - 29 sept. 2006 à 17:30
Bonjour,


Dans Excel, j'ajoute un commentaire sur une cellule en programmation vba :
Feuil1.Cells(1, 1).AddComment "eee"

Je souhaiterai que le commentaire apparaisse en caracteres GRAS (ou non pour certains commentaires).
Comment puis-je le programmer ?

Merci.


 

1 réponse

cs_wape Messages postés 262 Date d'inscription samedi 21 décembre 2002 Statut Membre Dernière intervention 19 décembre 2010 12
29 sept. 2006 à 17:30
Bonjour,

Essaye qqch du genre :

    With Range("A1")
       If Not .Comment Is Nothing Then .Comment.Delete
       .AddComment "Ceci est un commentaire normal"
    End With
   
    With Range("A2")
       If Not .Comment Is Nothing Then .Comment.Delete
       .AddComment "Ceci est un commentaire en gras"
       .Comment.Shape.OLEFormat.Object.Characters.Font.Bold = True
    End With

wape
0
Rejoignez-nous