Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1
Default Hide all open comments in a particular range


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

  #2   Report Post  
Posted to microsoft.public.excel.misc
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


  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1
Default Hide all open comments in a particular range


That is a nice little piece of code, thanks.

But I can't figure out how to make it only toggle off. is there a way
to customize the code so it only closes the comments and not opens
them?

thanks again

tx


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

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 82
Default Hide all open comments in a particular range

If you only want to make the comments invisible change the code from

rng.Comment.Visible = Not rng.Comment.Visible
to
rng.Comment.Visible = False

TK

"tx12345" wrote:


That is a nice little piece of code, thanks.

But I can't figure out how to make it only toggle off. is there a way
to customize the code so it only closes the comments and not opens
them?

thanks again

tx


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


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Is there a way to hide worksheets and/or rows/columns based on information enter into a particular cell of range of cells? Marc New Users to Excel 1 March 10th 06 05:10 PM
Display Comments on Each Page Stanley Excel Discussion (Misc queries) 0 February 23rd 06 06:05 PM
Array to named range conversion... i-Zapp Excel Discussion (Misc queries) 4 October 25th 05 09:09 PM
Need open ended cell for Sum range. Cris B. Excel Worksheet Functions 9 October 14th 05 04:52 PM
Match function...random search? Les Excel Worksheet Functions 10 July 28th 05 11:54 AM


All times are GMT +1. The time now is 06:03 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"