View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
Andy Pope Andy Pope is offline
external usenet poster
 
Posts: 2,489
Default Macro to get comments out of a spreadsheet

Hi,

Here is some code to get you started.

Sub TOC_Comments()

Dim rngCmt As Range
Dim rngCmts As Range
Dim rngOutput As Range

Set rngCmts = ActiveSheet.Cells.SpecialCells(xlCellTypeComments)
Set rngOutput = Worksheets.Add.Range("A1")

For Each rngCmt In rngCmts.Cells
rngOutput = "'" & rngCmt.Parent.Name & "'!" & rngCmt.Address
rngOutput.Offset(0, 1) = rngCmt.Comment.Text
Set rngOutput = rngOutput.Offset(1, 0)
Next

End Sub

Cheers
Andy

shanelaura wrote:
Thank you for the reply
Not quite the result I'm looking for
I would like to see the comments added to a blank spread not in comment
form but in text form if that makes sense



--

Andy Pope, Microsoft MVP - Excel
http://www.andypope.info