Bonjour a toutes et a tous
Météo 2° léger nuage (regionMegeve)
Je souhaiterais que cette macro fonctionne automatiquement des que dans une cellule je fais clic droit « insérer un commentaire »
Merci de votre aide
Sub Comments_AutoSize()
Dim MyComments As Comment
Dim lArea As Long
For Each MyComments In ActiveSheet.Comments
With MyComments
.Shape.TextFrame.AutoSize = True
If .Shape.Width > 300 Then
lArea = .Shape.Width * .Shape.Height
.Shape.Width = 200
' An adjustment factor of 1.1 seems to work ok.
.Shape.Height = (lArea / 200) * 1.1
End If
End With
Next ' comment
End Sub
(macro de Dana DeLouis)
D’avance merci
A+
Météo 2° léger nuage (regionMegeve)
Je souhaiterais que cette macro fonctionne automatiquement des que dans une cellule je fais clic droit « insérer un commentaire »
Merci de votre aide
Sub Comments_AutoSize()
Dim MyComments As Comment
Dim lArea As Long
For Each MyComments In ActiveSheet.Comments
With MyComments
.Shape.TextFrame.AutoSize = True
If .Shape.Width > 300 Then
lArea = .Shape.Width * .Shape.Height
.Shape.Width = 200
' An adjustment factor of 1.1 seems to work ok.
.Shape.Height = (lArea / 200) * 1.1
End If
End With
Next ' comment
End Sub
(macro de Dana DeLouis)
D’avance merci
A+