Thread: Comment
View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Amit Shanker Amit Shanker is offline
external usenet poster
 
Posts: 25
Default Comment

You are right, it's not needed. I was trying code in a different way before
posting and it simply got left there !!

Amit


"Beto" wrote in message
...
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.