copy data into comments?

  • Thread starter Thread starter Richard Miller
  • Start date Start date
This is just another general idea...

Sub Demo()
' Data in B1 to Comment in A1

'If no data in B1, then exit
If [B1].Value = vbNullString Then Exit Sub

If [A1].Comment Is Nothing Then
' If no comment, then 'Add' a comment
[A1].AddComment [B1].Value
Else
'else change existing comment
[A1].Comment.Text [B1].Value
End If

'AutoSize comment if desired
[A1].Comment.Shape.TextFrame.AutoSize = True
End Sub
 
Back
Top