ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Insert comment in a cell Excel (https://www.excelbanter.com/excel-programming/402270-insert-comment-cell-excel.html)

Frederic FV Villeneuve

Insert comment in a cell Excel
 
Is it possible to define the width and length of the comment in a cell by
Excel programming? Such a button in the Excel sheet, which add a comment in a
cell and this comment would have the length and width desired.


Bill Renaud

Insert comment in a cell Excel
 
Experiment with the following:

'----------------------------------------------------------------------
Public Sub TestCommentSize()
Dim rngA1 As Range
Dim comA1 As Comment

Set rngA1 = ActiveSheet.Range("A1")

With rngA1
.ClearComments
.AddComment "This is a very big, very long comment to test sizing."
Set comA1 = .Comment
End With

With comA1.Shape
.Height = 100
.Width = 50
End With
End Sub

--
Regards,
Bill Renaud





All times are GMT +1. The time now is 07:25 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com