boucle marge commentaire

Sheldor

XLDnaute Occasionnel
Supporter XLD
Bonjour excelienes et exceliens

j'ai pas mal de commentaires à insérer, j'ai fait une boucle mais je n'arrive pas à modifier le cadre et la marge dans cette boucle...
ne sachant l'écrire j'ai essayé d'adapter à partir de l'enregistreur de macro

Cells(ligne, col).Comment.ShapeRange.TextFrame.MarginLeft = 20
Cells(ligne, col).Comment.ShapeRange.Line.Visible = msoFalse

grand merci de votre aide

;)
 

Pièces jointes

  • marge.xls
    26.5 KB · Affichages: 26
  • marge.xls
    26.5 KB · Affichages: 31
  • marge.xls
    26.5 KB · Affichages: 28

Sheldor

XLDnaute Occasionnel
Supporter XLD
Re : boucle marge commentaire

si je décoche les marges automatique en enregistrant la macro j'obtiens par exp pour C1
Range("C1").Select
Range("C1").Comment.Text Text:="mon commentaire sympa"
Selection.ShapeRange.TextFrame.MarginLeft = 49.89
Selection.ShapeRange.TextFrame.MarginRight = 7.09
Selection.ShapeRange.TextFrame.MarginTop = 3.69
Selection.ShapeRange.TextFrame.MarginBottom = 3.69
pas de trace du "décochage"...
 

Sheldor

XLDnaute Occasionnel
Supporter XLD
Re : boucle marge commentaire

ah je crois que j'y suis ...

Cells(ligne, col).Comment.Shape.TextFrame.AutoMargins = False
Cells(ligne, col).Comment.Shape.TextFrame.MarginLeft = 50
Cells(ligne, col).Comment.Shape.Line.Visible = msoFalse

merci Pierre Jean, très bonne journée !
 

Discussions similaires

Statistiques des forums

Discussions
312 206
Messages
2 086 219
Membres
103 158
dernier inscrit
laufin