View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
PeterAtherton PeterAtherton is offline
external usenet poster
 
Posts: 42
Default Adding a comment to a cell in VBA?!

Dave's beaten me to it but here's a similar code

Sub addComment()
Dim c
For Each c In Selection
c.addComment "Test Comment" & Chr(10) _
& "Line 2"
Next c
End Sub

Peter Atherton



"Maury Markowitz" wrote:

The dox are quite clear, do this...

ActiveSheet.Range(DestCPr & ocount).AddComment "Formula price"

But this gives me an "Application defined error".

Anyone have an idea?

Maury