Insert Comments into a Cell
The code below shows how to insert a comment and delete a comment in a cell.
Program Code
Sub InsertComments() ' ************************************************************* ' Insert three rows of comments in cell C4 and adjust the size ' to contain all the comments ' ************************************************************* With Range("C4") .AddComment ("") 'This removes the user's name that autoinserts .Comment.Text Text:="123456789012345678901234567890" & Chr(10) _ & "123456789012345678901234567890" & Chr(10) _ & "123456789012345678901234567890" .Comment.Shape.ScaleWidth 1.8, msoFalse, msoScaleFromTopLeft .Comment.Shape.ScaleHeight 2.1, msoFalse, msoScaleFromTopLeft End With ' ************************************************************* ' Delete Cell Comments ' ************************************************************* If Not (Range("C4") Is Nothing) Then Range("C4").Comment.Delete End If End Sub