Kommetrafeld Höhe
06.02.2019 12:55:09
David
Wie kann ich den Code anpassen, das die Höhe automatisch jeh nach Textlänge bestimmt wird?
Vielen Dank schonmal.
David
Sub ResetShapeComments()
'Originally posted by Dana DeLouis 2000-09-16 - found and tweaked for my purposes...thank Dana _
for the post!
Dim MyComments As Comment
Dim lArea As Long
For Each MyComments In ActiveSheet.Comments
With MyComments
.Shape.TextFrame.AutoSize = True
If .Shape.Width > 130 Then
lArea = .Shape.Width * .Shape.Height
'Width of 262 gets me as close to 9.26cm as feasible
.Shape.Width = 130
.Shape.Height = XXX
End If
End With
Next ' comment
Dim cmt As Comment
For Each cmt In ActiveSheet.Comments
cmt.Shape.Top = cmt.Parent.Top + 5
cmt.Shape.Left = _
cmt.Parent.Offset(0, 1).Left + 5
Next
End Sub