Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 156
Default Comment Field


Is is possible to programmicably access the
comments in a speadsheet ?

I wish to save them to a file and replace them
in a new sheet.

There is a unique number in one column which could be
an identifier.

Any help appreciated.

Thanks - Kirk
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,302
Default Comment Field

Hi Kirk,

Try something like:

'=============
Public Sub ListComments()
Dim srcSH As Worksheet
Dim destSH As Worksheet
Dim destRng As Range
Dim CMT As Comment

Set srcSH = ThisWorkbook.Sheets("Sheet2") '<<==== CHANGE
Set destSH = Sheets.Add(after:=Sheets(Sheets.Count))
Set destRng = destSH.Range("A1")

For Each CMT In srcSH.Comments
With CMT
destRng.Value = srcSH.Name
destRng(1, 2).Value = .Parent.Address
destRng(1, 3).Value = .Text
End With
Set destRng = destRng(2)
Next CMT
End Sub
'<<=============

---
Regards,
Norman



"kirkm" wrote in message
...

Is is possible to programmicably access the
comments in a speadsheet ?

I wish to save them to a file and replace them
in a new sheet.

There is a unique number in one column which could be
an identifier.

Any help appreciated.

Thanks - Kirk



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 156
Default Comment Field

On Tue, 19 Sep 2006 10:30:52 +0100, "Norman Jones"
wrote:


That's great Norman.

Thank you very much.

Cheers - Kirk
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Excel comment field & images EAB1977 Excel Discussion (Misc queries) 1 July 31st 09 03:16 PM
Is it possible to embed a PDF in an Excel document comment field RG Excel Discussion (Misc queries) 1 July 16th 09 07:50 PM
Find and Replace in the Comment Field Richcarvel Excel Discussion (Misc queries) 2 May 1st 06 10:09 PM
Pivot Table Comment Field robertjtucker Excel Discussion (Misc queries) 6 August 1st 05 03:39 PM


All times are GMT +1. The time now is 06:27 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"