Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 400
Default Excel 2000: Comments

Three questions about comments:

1. Within a loop such as this:

for each cmt in activesheet.comments
... how do I find out the cell in which cmt is?
next

2. Is there a way of finding out if a cell, say the Activecell, has a
comment?

3. The Author property of a comment is read only; is there a way of changing
it other than by deleting it and recreating it? (hence, question 1).

Thanks for your help.

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 216
Default Excel 2000: Comments


"AA2e72E" wrote in message
...
Three questions about comments:

1. Within a loop such as this:

for each cmt in activesheet.comments
... how do I find out the cell in which cmt is?
next



cmt.parent.address


2. Is there a way of finding out if a cell, say the Activecell, has a
comment?


Two ways:

For Each cmt In ActiveSheet.Comments
If Not Intersect(cmt.Parent, ActiveCell) Is Nothing Then
MsgBox "activecell has comment"
End If
Next


On Error Resume Next
MsgBox ActiveCell.Comment.Text
On Error GoTo 0


3. The Author property of a comment is read only; is there a way of

changing
it other than by deleting it and recreating it? (hence, question 1).


Don't think so.


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,058
Default Excel 2000: Comments

You can create a range with commented cells:

Dim r, r2 As Range
On Error Resume Next
Set r = Selection.SpecialCells(xlCellTypeComments)

then you can loop on these cells

for each r2 in r
........................
msgbox(r2.address)

next
--
Gary's Student


"AA2e72E" wrote:

Three questions about comments:

1. Within a loop such as this:

for each cmt in activesheet.comments
... how do I find out the cell in which cmt is?
next

2. Is there a way of finding out if a cell, say the Activecell, has a
comment?

3. The Author property of a comment is read only; is there a way of changing
it other than by deleting it and recreating it? (hence, question 1).

Thanks for your help.

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default Excel 2000: Comments

#1. msgbox cmt.parent.address

#2. if activecell.comment is nothing then
'no comment
else
'has comment
end if

#3. You mean the "prefix" stuff that appears at the front of the comment? Just
what you suggested.

But you can insert a comment (using code) without that name:
http://www.contextures.com/xlcomments03.html#Plain
(From Debra Dalgleish's site)

There's lots of code examples there that you may want to review.

AA2e72E wrote:

Three questions about comments:

1. Within a loop such as this:

for each cmt in activesheet.comments
... how do I find out the cell in which cmt is?
next

2. Is there a way of finding out if a cell, say the Activecell, has a
comment?

3. The Author property of a comment is read only; is there a way of changing
it other than by deleting it and recreating it? (hence, question 1).

Thanks for your help.


--

Dave Peterson
  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 400
Default Excel 2000: Comments

Thanks for the replies.

I never thought about using intersect!

I did not mean just the name that appears in the comment itself but the
Author property; Bob has confirmed my own conclusion that it cannot be
changed.


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 2000 how to format the comments font all comments Delquestion Excel Discussion (Misc queries) 1 October 8th 09 02:19 PM
Excel 2000 Cell Comments Did Not Carry Over from Office 2003 DOUG ECKERT[_2_] Excel Discussion (Misc queries) 0 May 19th 08 10:28 PM
in excel useing comments how do you add clip art to comments? dhouse New Users to Excel 2 July 18th 07 08:14 AM
Editing Comments - Excel 2000 LPS Excel Discussion (Misc queries) 4 September 25th 06 05:49 PM
Pictures in comments - Excel 2000 Bwasp Excel Worksheet Functions 2 February 10th 05 02:44 AM


All times are GMT +1. The time now is 02:51 AM.

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"