3 replies
by dklippert
I don't have a quick solution, but here are a couple of code snippets you may be able to massage.
The first pcopies the comments to other columns. The second writes to a text file.
Sub CopyComments()
For Each c In ActiveSheet.Comments
i = i + 1
Cells(i, "F").Value = c.Parent.Row
Cells(i, "G").Value = c.Parent.Column
Cells(i, "H").Value = c.Text
Next c
End Sub
or
---Posted 1 July 1999 by N.Hodge----
Create a text file on your desktop, (or change the reference in the code), calledtest.txt and run the code below.
This will write each comment, on all worksheets, with it's address and sheet no. to the txt file and close it. If you want it to strip off the user name, you'll have to write some code to do that.
Sub writeComments()
Dim mycomment As Comment
Dim mySht As Worksheet
Open "C:\Windows\Desktop\Test.txt" For Output As #1
For Each mySht In Worksheets
For Each mycomment In Worksheets(mySht.Name).Comments
Print #1, "From " & mycomment.Parent.Parent.Name _
& mycomment.Parent.Address _
& " Comes the comment: " _
& mycomment.Text
Next mycomment
Next mySht
Close #1
End Sub
--
written by:
Nick Hodge
Southampton, England
nick_hodge@lineone.net
by bradsq&a
by bradsq&a
This discussion is closed to new replies.
Trending Software posts
Sort by Trending