View Single Post
 
Old 02-07-2012, 11:04 PM
macropod's Avatar
macropod macropod is online now Windows 7 64bit Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,363
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

I can't see why you'd want to add the same comment to all such cells but, if that's what you want, try:
Code:
Sub AddComments()
Dim ocel As Range
On Error Resume Next
For Each ocel In ActiveSheet.UsedRange.SpecialCells(xlCellTypeConstants)
  ocel.Comment.Delete
  ocel.AddComment "Comment Text"
Next
End Sub
Note that this code will replace any existing comments. If you don't want to do that, delete or comment-out the 'ocel.Comment.Delete' line.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote