View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Jim Thomlinson Jim Thomlinson is offline
external usenet poster
 
Posts: 5,939
Default Finding comments

This code should work...

Public Sub CommentsMessage()
Dim rngFoundComments As Range
Dim rng As Range

On Error Resume Next
Set rngFoundComments = Range("A1:Z100").SpecialCells(xlCellTypeComments)
On Error GoTo 0
If rngFoundComments Is Nothing Then
MsgBox "No Comments"
Else
For Each rng In rngFoundComments
MsgBox rng.Comment.Text
Next rng
End If
End Sub
--
HTH...

Jim Thomlinson


"JT" wrote:

Is it possible to move through some data and determine if there is a comment
in the cell in question?

I want to go through a range of cells and if the macro finds a comment, I
want to display a msgbox.

Thanks for the help.....

--
JT