PDA

View Full Version : Solved: Remove All Comments



reza_doang
06-09-2010, 07:47 PM
Hi,

i found interesting vba code here about tracking changes with comments.
And before i deliver my files to my client i want to remove all comment from my workbook.
can someone help me?

many thanks...

reza

domfootwear
06-09-2010, 07:50 PM
Hi,

i found interesting vba code here about tracking changes with comments.
And before i deliver my files to my client i want to remove all comment from my workbook.
can someone help me?

many thanks...

reza
Try this code


Sub DeleteCM()
Dim sh As Worksheet, cm As Comment
For Each sh In ActiveWorkbook.Worksheets
For Each cm In sh.Comments
cm.Delete
Next
Next
End Sub

reza_doang
06-09-2010, 07:54 PM
fabulous...
work greats and thanks for quick response