how do I paste excel text into a comment box?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have data in excel in muliple rows and columns, I want to copy this data
and paste it into a comment. Any suggestions?
 
Select the cells (any rows or columns) and run this macro:

Sub commentset()
Dim r As Range
Dim s As String
s = ""
For Each r In Selection
s = s & r.Value
Next
With Range("K9")
.AddComment
.Comment.Visible = False
.Comment.Text Text:=s
End With
End Sub

I picked K9 as the destination to hold the comment, you can pick anything
you want.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top