1. 程式人生 > >Excel根據批註的內容自動調整批註大小

Excel根據批註的內容自動調整批註大小

 Sub test()

Dim Cmt As Comment

For Each Cmt In ActiveSheet.Comments

With Cmt

.Shape.TextFrame.AutoSize = True

End With

Next

End Sub