Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Excell Add Comment
How do I check if a Cell has a comment field in VBA before I try and ADD a
comment? e.g. if Cells(A,1).Comment = True Cells(A,1).Comment.Delete Else Cells(A,1).AddComment Cells(A,1).Comment.Text("My Text") |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Excell Add Comment
Hi Bob,
Try something like: '============= Public Sub Tester() Dim rng As Range Set rng = ActiveCell '<<==== CHANGE If Not rng.Comment Is Nothing Then 'Existing comment, do nothing Else rng.Comment.Add 'Your code End If End Sub '<<============= --- Regards, Norman "Bob Smith" wrote in message ... How do I check if a Cell has a comment field in VBA before I try and ADD a comment? e.g. if Cells(A,1).Comment = True Cells(A,1).Comment.Delete Else Cells(A,1).AddComment Cells(A,1).Comment.Text("My Text") |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
auto locking of excell workbook (excell 2003) | Excel Discussion (Misc queries) | |||
how do you open an excell email attacment, if I dont have excell | Excel Discussion (Misc queries) | |||
How can I edit a comment w/o first having to select Show Comment | Excel Discussion (Misc queries) | |||
How do I change the Defaults for the Excell comment box. | Excel Discussion (Misc queries) | |||
a comment plugin & copy paste directly from excel to comment ? fr. | Excel Worksheet Functions |