View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
external usenet poster
 
Posts: 27,285
Default Comment Question

It would be easier to address this if you had posted the code that does the
report, but basically you can test if the cell has a comment (assuming you
mean the Insert=Comment type comment and not just text entered in a cell).

Sub Tester1()
Dim cmt As Comment
Dim sStr As String
Set cmt = Nothing
On Error Resume Next
Set cmt = ActiveCell.Comment
On Error GoTo 0
If Not cmt Is Nothing Then
sStr = cmt.Shape.TextFrame.Characters.Text
Worksheets("Report").Cells(1, 1).Value = sStr
End If
End Sub

--
Regards,
Tom Ogilvy



Robbyn wrote in message
...
Hello again. I would like to copy any comments from a source worksheet to

a report worksheet if they occur. The user chooses a row from a listbox and
then a report worksheet is generated based on what is selected. The report
page is similar to the format below:

Assignment Points Comments

Test 1 90
Test 2 Absent
Test 3 85
Test 4 Absent

I've tried sooo many things but can't seem to get to the comment part to

work. Any advice would be appreciated.
Thanks again.

Robbyn