Mega Code Archive

 
Categories / VisualBasic Script / Excel
 

Count Comments

Sub CountComments()     CommentCount = 0     For Each cell In ActiveSheet.UsedRange         On Error Resume Next         x = cell.Comment.Text         If Err = 0 Then CommentCount = CommentCount + 1     Next cell     Debug.Print CommentCount End Sub