Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]() 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
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]() 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
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
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 |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Is there a way to hide worksheets and/or rows/columns based on information enter into a particular cell of range of cells? | New Users to Excel | |||
Display Comments on Each Page | Excel Discussion (Misc queries) | |||
Array to named range conversion... | Excel Discussion (Misc queries) | |||
Need open ended cell for Sum range. | Excel Worksheet Functions | |||
Match function...random search? | Excel Worksheet Functions |