Home |
Search |
Today's Posts |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Yes, both will remove all comments, but the first one also removes any other
values in the cell and then shifts cells upward in those columns. So, if you only want to remove comments, the second one is probably what you should use. You can specify any range of cells. Example: For Each c In ActiveSheet.Range("A2:G40").Comments 'code to delete Next "kirkm" wrote: On Sat, 21 Feb 2009 19:18:01 -0800, JLGWhiz wrote: To clear contents and comments: Sub dk() ActiveSheet.UsedRange. _ SpecialCells(xlCellTypeComments).Delete End Sub To clear comments only: Sub sl() Dim c As Comment For Each c In ActiveSheet.Comments If Not c Is Nothing Then c.Delete End If Next End Sub I found that both routines c.Delete removes the comment completely. Cheers - Kirk |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Excel 2007 - Clearing All Comments | Excel Discussion (Misc queries) | |||
Clearing cells without clearing formulas | Excel Discussion (Misc queries) | |||
Clearing Comments? | Excel Programming | |||
Code seems to crash after clearing comments | Excel Programming | |||
Code crashes after clearing comments | Excel Worksheet Functions |