Class CommentThreaded (Excel VBA)
The class CommentThreaded represents a cell's threaded comment. This object can represent both a top-level comment or its replies.
To use a CommentThreaded class variable it first needs to be instantiated, for example
Dim ctd as CommentThreaded Set ctd = Dim strText As String: strText = ActiveCell.AddCommentThreaded(Text:=strText)
The following procedures can be used to set variables of type CommentThreaded: Replies, Worksheet.CommentsThreaded, CommentsThreaded.Item, Next, Previous, AddReply, Range.AddCommentThreaded and Range.CommentThreaded
Here is an example of processing the CommentThreaded items in a collection.
Dim ctdReplie As CommentThreaded For Each ctdReplie In Application.Replies Next ctdReplie
These are the main methods of the CommentThreaded class
AddReply - If the comment is a top-level comment, it will add a reply to its replies collection.
Dim ctdAddReply As CommentThreaded Set ctdAddReply = ActiveCell.AddCommentThreaded.AddReply()
Delete - Deletes the specified threaded comment and all replies associated with that comment (if any exist).
CommentsThreaded.Item - Returns a single object from a collection.
Next - Returns a CommentThreaded object that represents the next threaded comment.
Previous - Returns a CommentThreaded object that represents the previous threaded comment.
Text - Sets threaded comment text.
CommentsThreaded.Count returns a Long value that represents the number of objects in the collection.
CommentsThreaded.Parent returns the parent object for the specified object. Read-only.
Author returns the Author object that represents the author of the specified CommentThreaded object.
Date returns a date String-Variant that represents the date and time that a threaded comment was added in local time. Read-only.
Parent returns the parent object for the specified object. Read-only.
Replies if this comment is a parent, returns a CommentsThreaded collection of CommentThreaded objects that are children/replies of the specified comment (if any exist). The replies are sorted by time stamp.