Una famiglia di software per fogli di calcolo Microsoft con strumenti per l'analisi, la creazione di grafici e la comunicazione dei dati.
Ciao Giuseppe,
Ho trascurato il problema della dimensione dei commenti!
Quindi, sostituisci il codice precedente con la seguente versione:
'=========>>
Option Explicit
'--------->>
Public Sub Tester()
Dim WB As Workbook
Dim SH As Worksheet
Dim oComment As Comment
Const myIndent As Long = 5
Set WB = ThisWorkbook
On Error GoTo XIT
Application.ScreenUpdating = False
For Each SH In WB.Worksheets
With SH
For Each oComment In .Comments
With oComment
.Shape.Top = .Parent.Top + myIndent
.Shape.Left = .Parent.Offset(0, 1).Left + myIndent
Call ResizeComments(oComment)
End With
Next
End With
Next SH
XIT:
Application.ScreenUpdating = True
End Sub
'--------->>
Public Sub ResizeComments(aComment As Comment)
Dim myArea As Long
With aComment.Shape
.TextFrame.AutoSize = True
If .Width > 300 Then
myArea = .Width * .Height
.Width = 200
.Height = (myArea / 200) * 1.1
End If
End With
End Sub
'<<=========
===
Regards,
Norman