Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Last Comment
How do I set a cell equal to the text in the last comment in a column?
-- Gary's Student |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Last Comment
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 |
#3
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 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
copy comment content to cell content as data not as comment | Excel Discussion (Misc queries) | |||
How can I edit a comment w/o first having to select Show Comment | Excel Discussion (Misc queries) | |||
How do I insert a comment when the Insert:Comment menu is greyed? | Excel Discussion (Misc queries) | |||
Comment Box | Excel Discussion (Misc queries) | |||
a comment plugin & copy paste directly from excel to comment ? fr. | Excel Worksheet Functions |