I find lots of examples for creating but none for retrieving the text of a cell comment. Am I missing something obvious?
Range.Comment.Text
seems to work without any problem here...
(e. g. if not ActiveCell.Comment is nothing then debug.print ActiveCell.Comment.Text
)
Try going for:
Dim comtext as string
If ActiveCell.Comment Is Nothing Then
comtext = ""
Else
comtext = ActiveCell.Comment.Text
End If
As for me, if you want to paste comment text as other cell value you might need to use:
Selection.ClearFormats
since sometimes comment text which you pasted or set cell value might be invisible at first.
PS. This is my first post ever on this side, so I've just started learning the ropes.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With