Thread: Comment
View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
Beto[_3_] Beto[_3_] is offline
external usenet poster
 
Posts: 140
Default Comment

Amit Shanker wrote:

For comments :

Sub AddOrDeleteComment()
Dim cmt As Comment

If ActiveCell.Comment Is Nothing Then
ActiveCell.AddComment "This is a new comment"
Else
ActiveCell.Comment.Delete
End If

End Sub

Hi, do you need the "Dim cmt as Comment"? Because I can't see where it's
used.

As for the Right Click, you can set Cancel to True in the
BeforeRightClickEvent of the Workbook.

Regards,
--
Beto
Reply: Erase between the dot (inclusive) and the @.
Responder: Borra la frase obvia y el punto previo.