Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 29
Default Test a cell for a comment presence from within a macro form 2007

I would like to completely control cell comments from a macro form. I am
unable to determine if a cell does not have a comment or does have one. How
do you relate the comment of each cell in a row of cells to its comment
object. Comment index numbers do not seem to carry any relationship with
them outside the object.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,600
Default Test a cell for a comment presence from within a macro form 2007

dim cell as Range
dim cmt as Comment

'' relate comment to cell

For each cell in Range("A1:J1")
If not cell.Comment Is nothing then
' it has a comment
Set cmt = cell.Comment ' if want to do more with the comment
debug.? cell.Address(),0)
debug.? cmt.Text
end if
next


relate cell to comment

For each cmt in Activesheet.comments
debug.? cmt.parent.Address(),0)
debug.? cmt.Text
Next

Regards
Peter T




"Fritz" wrote in message
...
I would like to completely control cell comments from a macro form. I am
unable to determine if a cell does not have a comment or does have one.

How
do you relate the comment of each cell in a row of cells to its comment
object. Comment index numbers do not seem to carry any relationship with
them outside the object.



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
how to add comment in cell using excel 2007 esto bear Excel Worksheet Functions 4 July 27th 09 07:11 PM
How can I test a range of cells for the presence of a border? PFB Excel Worksheet Functions 7 November 10th 08 05:19 AM
How to test Excel 2003 & 2007 macro security level Tom Excel Programming 5 November 9th 07 03:29 PM
Test for presence of chart on active sheet Katherine Excel Programming 2 March 8th 05 01:07 PM
Need to test for file presence Grant Excel Programming 3 October 26th 04 08:57 PM


All times are GMT +1. The time now is 03:14 AM.

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

About Us

"It's about Microsoft Excel"