Posted to microsoft.public.excel.programming
|
|
Last Comment
Thank you (yet again)
--
Gary's Student
"Jim Cone" wrote:
Hello Gary,
This seems to work...
'----------------------------
Sub TestForComments()
Dim rngColumn As Excel.Range
Dim objComment As Excel.Comment
Dim lngRow As Long
Dim strText As String
Set rngColumn = ActiveSheet.Columns(2).Cells
For Each objComment In ActiveSheet.Comments
If Not Application.Intersect(objComment.Parent, rngColumn) Is Nothing Then
If objComment.Parent.Row lngRow Then
lngRow = objComment.Parent.Row
strText = objComment.Text
End If
End If
Next
Range("F1").Value = strText
End Sub
'-------------------------------------
Regards,
Jim Cone
San Francisco, USA
http://www.realezsites.com/bus/primitivesoftware
"Gary''s Student"
wrote in message
...
How do I set a cell equal to the text in the last comment in a column?
--
Gary's Student
|