Set author for a comment?

M

Myles

Is there some way to set the Author of a comment on a specific cell? I've
tried using the .author but i'm guessing that's read only.

Thanks guys!
 
S

Sheeloo

For an existing comment you must get the text, search and replace the author,
delete the comment and reinsert it with the updated text
..Author is a read only property
Author in the comment comes from Application.UserName

See Debra's article on 'Comments' at
http://www.contextures.com/xlcomments03.html
to learn all about comments programming.
 
M

Myles

Okay but whenever i use the

cells(1,1).addcomment "comment"

it automatically doesn't put any author in there even if i change the
Application.UserName

So how do i get it to put the author in there?
 
S

Sheeloo

cmt = Application.UserName
cmt = cmt & ":" & Chr(10) & "Comment"
'Delete the comment if it exists
'Cells(1, 1).Comment.Delete
Cells(1, 1).AddComment cmt
 
Top