View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
T Kirtley T Kirtley is offline
external usenet poster
 
Posts: 82
Default Hide all open comments in a particular range

Some vba like the following should toggle the visibility of the comments in
the current selection:

Sub clrComment()
Dim rng As Range
For Each rng In Selection
If Not rng.Comment Is Nothing Then
rng.Comment.Visible = Not rng.Comment.Visible
End If
Next rng
End Sub

Hope that helps,

TK

"tx12345" wrote:


Hi

I have a range of cells on a sheet that have comments the user can make
visible. I know how to hide one cells comments:


Code:
--------------------
Range("a1").Select
ActiveCell.Comment.Visible = False
--------------------


vut what if there are several comments open in range("a1:a30")? Is
there a way to close them all at one time *without* employing the
universal command to hide all comments throughout the workbook?

Many thanks

tx


--
tx12345
------------------------------------------------------------------------
tx12345's Profile: http://www.excelforum.com/member.php...o&userid=24776
View this thread: http://www.excelforum.com/showthread...hreadid=574355