Class Comments (Excel VBA)
A collection of cell comments. To use a Comments class variable it first needs to be instantiated, for example
Dim cmms as Comments
Set cmms = ActiveSheet.Comments
For Each
Here is an example of processing the Comments items in a collection.
Dim cmm As Comment
For Each cmm In Application.Comments
Next cmm
Count
Returns a Long value that represents the number of objects in the collection.
Dim lngCount As Long
lngCount = ActiveSheet.Comments.Count
Item
Returns a single object from a collection.
Item (Index)
Index: The index number for the object.
Dim cmm As Comment
Set cmm = ActiveSheet.Comments(Index:=1)