Bonjour
J'ai trouvé sur ce forum le code qui permet de modifier avec vba l'ensemble des commentaire d'un classeur:
Dim sh As Worksheet
Dim oComment As Comment
For Each sh In ThisWorkbook.Worksheets
For Each oComment In sh.Comments
With oComment.Shape
.DrawingObject.Text = Replace(.DrawingObject.Text, "2009", année)
End With
Next
Next sh
En modifiant "In ThisWorkbook.Worksheets" par "In ActiveSheet.Comments", çà fonctionne pas
Comment adapter ce code pour modifier avec vba l'ensemble des commentaire de la feuille active.
Un petit coup de pouce SVP.
Merci d'avance.
J'ai trouvé sur ce forum le code qui permet de modifier avec vba l'ensemble des commentaire d'un classeur:
Dim sh As Worksheet
Dim oComment As Comment
For Each sh In ThisWorkbook.Worksheets
For Each oComment In sh.Comments
With oComment.Shape
.DrawingObject.Text = Replace(.DrawingObject.Text, "2009", année)
End With
Next
Next sh
En modifiant "In ThisWorkbook.Worksheets" par "In ActiveSheet.Comments", çà fonctionne pas
Comment adapter ce code pour modifier avec vba l'ensemble des commentaire de la feuille active.
Un petit coup de pouce SVP.
Merci d'avance.