Copying comments text to a cell using vba

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

Guest

Is it possible to copy the contents of a comments box to a cell on a
different sheet using VBA?
 
Hi TommoUK,

Try something like:

'=============>>
Public Sub Tester001()
Dim SrcRng As Range
Dim destRng As Range
Dim cmt As Comment

Set SrcRng = ThisWorkbook.Sheets("Sheet1").Range("A1")
Set destRng = ThisWorkbook.Sheets("Sheet2").Range("B1")

Set cmt = SrcRng.Comment

destRng.Value = cmt.Text

Set cmt = Range("A1").Comment

End Sub
'<<=============
 

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